home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / tridv300.zip / TRIDOOR.DOC < prev    next >
Text File  |  1993-03-28  |  125KB  |  3,495 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                        T R I U M P H   S O F T W A R E
  11.  
  12.  
  13.                                   Presents
  14.  
  15.  
  16.  
  17.  
  18.  
  19.            ░██████████        ░██   ░███████
  20.            ░█  ░██  ░█               ░██  ░██
  21.                ░██     ░█░██  ░██    ░██  ░██  ░███   ░███  ░█░██
  22.                ░██      ░█ ░█  ░█    ░██  ░██ ░█  ░█ ░█  ░█  ░█ ░█
  23.               ░████    ░██    ░███  ░███████   ░███   ░███  ░██
  24.  
  25.  
  26.                       Completely revised and refined!
  27.  
  28.  
  29.  
  30.  
  31.  
  32.    An On-Line Door Support Unit For use with Turbo Pascal 5.5, 6.0 and 7.0
  33.  
  34.  
  35.  
  36.                   TriDoor Written by Christopher M. Russo
  37.           TriComm Communications Support Written by Jeremy H. DuBois
  38.  
  39.         TriDoor, TriComm (c)1993 Triumph Software, All Rights Reserved.
  40.  
  41.             Voice : (508)263-4247 (Business) / (508)263-8420 (Home)
  42.  
  43.                   Support BBS : Tour de Force (508)897-1963
  44.  
  45.  
  46.  
  47.        PCBoard is a Registered Trademark of Clark Development CO, Inc.
  48.           QuickBBS is a Registered Trademark of the QuickBBS Group.
  49.            Turbo Pascal is a Registered Trademark of Borland, Inc.
  50.  
  51.      Triumph Software is not affiliated either Clark Development Co. Inc.,
  52.                The QuickBBS Group or Borland, Inc. in any way.
  53.  
  54.  
  55.  
  56.  
  57. Triumph Software - TriDoor Documentation                                  pg. i
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                  DISCLAIMER
  64.  
  65.  
  66.      Triumph Software and  the  employees/programmers  in  conjunction with
  67.   and/or affiliated  with Triumph Software  can  not  be  held  responsible
  68.   for  the  condition  of any  software  received  through any  non-postal/
  69.   non-parcel means.  
  70.  
  71.      Nor  can  said persons  be held  responsible for  any damage caused to
  72.   media or hardware as a direct or indirect result of the use of any of our
  73.   products.
  74.  
  75.      Triumph Software and  it's employees and  associates would like  it to
  76.   be known,  however, that  all of  their  products are  thoroughly  tested
  77.   before  leaving  our  offices.  It  is  only  in the deepest faith in our
  78.   own product that any such software is released to the public.
  79.  
  80.      Triumph  Software reserves  the right  to  change  any  documentation,
  81.   disclaimer,  licensing information  or registration  procedures and costs
  82.   at any time for any reason with no prior warning or notice.
  83.  
  84.  
  85.  
  86. Triumph Software - TriDoor Documentation                                pg. ii
  87.  
  88.  
  89.  
  90.  
  91.  
  92.                          LIMITED LICENSING AGREEMENT
  93.  
  94.  
  95.      The holder of  the  unregistered TriDoor package  is allowed a limited
  96.    usage period of 30 (thirty)  days,  wherein  he  or she  may incorporate
  97.    the unit  in any program  that he or she develops as long as the program 
  98.    incorporating the  TriDoor unit is not distributed  in any manner at any 
  99.    time.  After  the thirty day period, the holder of the unregistered copy
  100.    of the TriDoor  package must register the software to be allowed further
  101.    use of TriDoor.
  102.  
  103.      A private registered  copy may be obtained by filling  out the TriDoor
  104.    registration form and sending both the registration form and  $15.00, in
  105.    the form  of a  check or  money order, to Triumph Software.  The private
  106.    copy will  allow the registered  owner  to produce  programs  using  the
  107.    TriDoor  unit  and  distribute  them  as long as  the registered copy of
  108.    TriDoor  is  not   included  in   the    package,   no  compensation  is
  109.    obtained in any way from the distribution of the  software incorporating
  110.    the TriDoor unit, and Triumph Software is given ample credit as depicted
  111.    in the  final chapter  of  this document.  The  registered  copy  of the
  112.    TriDoor unit must not be distributed in any way other than as a compiled
  113.    portion of a program or software produced by the registered copy holder.
  114.  
  115.      A  commercial  registered  copy  may  be  obtained  by filling out the
  116.    TriDoor  registration  form and sending  both the registration  form and
  117.    $30.00, in the form of  check or  money order, to Triumph Software.  The
  118.    commercial copy  will allow  the registered  owner  to  produce programs
  119.    using the TriDoor unit and distribute them.  This  copy  also allows the
  120.    holder of  the  registered  copy to  obtain legal  compensation  for the
  121.    program incorporating the TriDoor package.  The holder of the commercial
  122.    registered  copy  must include  acceptable credit  in  the documentation
  123.    of his or  her  program as  further  explained  in  the final chapter of
  124.    this document.  The  registered copy  of the  TriDoor unit  must  not be
  125.    distributed in any way other than as a compiled  portion of a program or
  126.    software produced by the registered copy holder.
  127.  
  128.      An individual copy must be registered for each  individual company and
  129.    person.  The  only exception  is in  the case  of a  company  owned by a
  130.    person in  which case the copy may be registered for both in the case of
  131.    a commercial copy.
  132.  
  133.      Triumph Software reserves the right to  revoke registration privileges
  134.    either temporarily  or permanently if the conditions of the registration
  135.    are not properly met by the holder of the registered TriDoor package.
  136.  
  137.      Triumph Software reserves the right to use the registered owners name,
  138.    company and/or product  created incorporating the TriDoor unit in any of
  139.    Triumph Software's advertising of any type.
  140.  
  141.      Registered  copy holders  will be  entitled to  minor  upgrades of the
  142.    TriDoor package at a minimal processing  and materials fee  of $5.00 per
  143.    upgrade.
  144.  
  145.  
  146.  
  147.  
  148.  
  149. Triumph Software - TriDoor Documentation                                pg. iii
  150.  
  151.  
  152.  
  153.  
  154.  
  155.                           HOW TO USE THIS MANUAL
  156.  
  157.  
  158.      First and  most importantly is  that you  read the  entire manual from
  159.    front  to back.  As  easy as  TriDoor is  to use  it will  be absolutely
  160.    useless to you if you don't at least read most of it, and in addition to
  161.    that  there are also many hints and refining  tips in this document that
  162.    will help you to truly take command of this software.
  163.  
  164.      It is also a very good idea to print this  document out.  It  is  made
  165.    especially for printers  allowing for page length  and form feeds and so
  166.    on.  Having a hard  copy of the text in your hand while you work on your
  167.    program will prove to be invaluable.
  168.  
  169.      Keep in mind that a Microsoft Word for Windows formatted document file
  170.    is  included with  this package.  For  those  of  you  with  dot  matrix
  171.    printers, printing  this out will take about 47 years; it will, however,
  172.    be a  very nice  manual for  you to refer to.  It is  set up just like a
  173.    professional  manual  for  ease  of  use.  The  name  of  this  file  is
  174.    TRIDOOR.WIN.  Also note that  some fonts  in this document are extremely
  175.    large and may need to be reduced to keep your particular printer happy.
  176.  
  177.      If you would  like  this manual but  do not  want to invest the  time,
  178.    printer  ribbon, laser   printer  toner,  or  other  resources, consider
  179.    purchasing our professionally bound copy of this document, laser printed
  180.    and even  with an envelope  to hold  your TriDoor floppies.  For further
  181.    information, see the registration form in the file TRIDOOR.REG.
  182.  
  183.      As far as the actual text goes, you need to keep a  few things in mind
  184.    about my format.
  185.  
  186.        * Anything followed by a "()" is a function or procedure.
  187.          i.e. td_writeln(), td_readln() and read_dorinfo()
  188.  
  189.        * Anything contained in "<>"s is a TriDoor variable accessible
  190.          by you, the programmer.
  191.          i.e. <disable_queue>, <stats.real_baud>  and <halt_program>
  192.  
  193.  
  194.      The rest is simply in the text itself.  Good luck and happy reading.
  195.  
  196.  
  197.  
  198. Triumph Software - TriDoor Documentation                                pg. iv
  199.  
  200.  
  201.  
  202.  
  203.  
  204.                            TABLE OF CONTENTS
  205.  
  206.  
  207.      1.0 Why Use TriDoor? . . . . . . . . . . . . . . . . . . . . . . 001
  208.  
  209.      2.0 Features of TriDoor. . . . . . . . . . . . . . . . . . . . . 002
  210.  
  211.      3.0 What's New This Version. . . . . . . . . . . . . . . . . . . 004
  212.  
  213.      4.0 Standard Programming Procedures. . . . . . . . . . . . . . . 006
  214.          4.1 Programming with TriDoor . . . . . . . . . . . . . . . . 006
  215.          4.2 Programming Tips . . . . . . . . . . . . . . . . . . . . 009
  216.  
  217.      5.0 Advanced Programming Procedures. . . . . . . . . . . . . . . 010
  218.          5.1 Advanced Programming with TriDoor. . . . . . . . . . . . 010
  219.          5.2 Locked Communications Support. . . . . . . . . . . . . . 011
  220.          5.3 Creating Your Own Door Support . . . . . . . . . . . . . 012
  221.  
  222.      6.0 Standard Command Summary . . . . . . . . . . . . . . . . . . 014
  223.  
  224.      7.0 Advanced Command Summary . . . . . . . . . . . . . . . . . . 051
  225.  
  226.      8.0 Accessible Global Variables and Constants. . . . . . . . . . 069
  227.          8.1 Accessible Global Variables. . . . . . . . . . . . . . . 069
  228.          8.2 Accessible Global Constants. . . . . . . . . . . . . . . 072
  229.  
  230.      9.0 Reserved Words . . . . . . . . . . . . . . . . . . . . . . . 073
  231.  
  232.     10.0 Acceptable Credit in Programs and Documentation. . . . . . . 074
  233.  
  234.     11.0 Who to Contact . . . . . . . . . . . . . . . . . . . . . . . 075
  235.  
  236.     12.0 History of TriDoor . . . . . . . . . . . . . . . . . . . . . 076
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244. Triumph Software - TriDoor Documentation                                pg. 001
  245.  
  246.  
  247.  
  248.  
  249.  
  250.                           1.0  WHY USE TRIDOOR?
  251.  
  252.  
  253.      TriDoor is the  most advanced,  efficient  and easy-to-use  utility of
  254.    it's kind available  on the software  market today.  It allows  even the
  255.    novice  Borland  Turbo Pascal  programmer  to  create  fully-functioning
  256.    doors,  on-line  programs and utilities  in a  matter of minutes without
  257.    ever having to  delve  into  the hundreds  of  texts  on  communications
  258.    programming.
  259.  
  260.      In addition  to having complete  communications  support  TriDoor also
  261.    comes equipped with many  other features which are extremely useful when
  262.    writing communications  applications.  Examples of  these are color ANSI
  263.    graphics controls,  user time  handling routines  and  many  Pascal-like
  264.    commands such as td_writeln() which is the communications  equivalent of
  265.    write() and writeln().
  266.  
  267.      TriDoor is  flexible too!  With  the  exception of  a few  things here
  268.    and there (like the tell-tale chat mode) your  users may never even know
  269.    that you  did not write  the entire program- communications routines and
  270.    all.  You will see no  hard-coded error  messages,  forced configuration
  271.    files or annoying  restrictions that you did not develop yourself.  This
  272.    allows you to  use all  your programming  resources  the way YOU want as 
  273.    opposed to the way a tool kit may  have set them up.  A prime example of
  274.    this is command line parameters; some tool kits  will force you to enter
  275.    in the name  of a configuration  file on  the command line.  What if you
  276.    would rather enter in an IRQ setting or a user name?  What if you do not
  277.    want a configuration file?  TriDoor allows you to do as you will.
  278.  
  279.      The programming  possibilities  are endless- I  have  written  on-line
  280.    games,  archive  viewing  utilities,  text/ANSI  graphics  file viewers,
  281.    "top ten list"  generators,  terminal  programs, SysOp  paging doors and
  282.    many MANY more.
  283.  
  284.      How many  times have you said to yourself, "This is truly an excellent
  285.    system I have running if  only I could add on a [blank] without changing
  286.    to a new  BBS  software..."?  Well, there  are a  few solutions  to this
  287.    problem:  You could switch BBS software which may give you a few options
  288.    you did not have before but you are also reducing yourself to rebuilding
  289.    a system  you have already put  probably hundreds  of hours of work into
  290.    and potentially compromising the quality of your user's environment -or-
  291.    you  could  download a  door  from your  local BBS  where you may find a
  292.    program to do what you need, but it  may  not  be  EXACTLY what you want
  293.    -or- you could use TriDoor to write your own!  You  could have  the door
  294.    you want, make  the changes you  need at ANY  time and have the pleasure
  295.    of having made it yourself.
  296.  
  297.      I frequently  find  myself saying, "If you cannot do  it with TriDoor,
  298.    then you  probably cannot do it."   I have only  scraped the  surface of
  299.    it's capabilities  and ease of use; the  rest is up to you. You now hold
  300.    the power to make the doors,  on-line games and utilities  that you have
  301.    always wanted!
  302.  
  303.  
  304. Triumph Software - TriDoor Documentation                                pg. 002
  305.  
  306.  
  307.  
  308.  
  309.  
  310.                          2.0  FEATURES OF TRIDOOR
  311.  
  312.  
  313.      TriDoor has  many  advanced and  VERY easy-to-use  features  which are
  314.    built  right in.  And  although  there are   so many  that  I  literally
  315.    cannot  remember ALL  of them, we are  still adding all the time so give
  316.    us a call so we can get you a copy of the latest version.
  317.  
  318.         * NOW VERY INEXPENSIVE!  SEE LICENSING AGREEMENT!
  319.  
  320.         * Automatic set-up and support of communications ports
  321.         * Automatic reading and processing of DORINFO1.DEF and PCBOARD.SYS
  322.         * Easy to use commands such as td_writeln() and td_readln() which 
  323.           function as communications supporting equivalents of the Turbo
  324.           Pascal commands
  325.         * Built-in chat mode with word-wrap and ANSI color graphics
  326.         * Boolean variable halt_program which is set to TRUE if [F8] is
  327.           hit from the local keyboard- allows for programmer-defined
  328.           or non-existent "hang-up" procedures
  329.         * Easy forced "caps-lock", and "password-entry" (see "***"
  330.           instead of "hey" or "YOU" instead of "you")
  331.         * Length restriction available on input fields
  332.         * Built-in string capitalization, first letter capitalization and
  333.           easy integer/longint to string conversion available
  334.         * Built-in direct screen write functions
  335.         * Automatic status bar displaying time, name and baud rate
  336.         * Automatic on-line user time handling routines
  337.         * Built-in routines for clearing user's and local screen
  338.         * Built-in Boolean response "Are you sure?" function
  339.         * Built-in user-page (>BEEP!< "The SysOp is paging you!" >BEEP!<)
  340.         * Automatic "Last Printed" memory (can be disabled)
  341.         * Command list status bar on local screen
  342.         * Auto-sensing of color/monochrome local screen
  343.         * Borland Turbo Pascal 5.5 AND 6.0 support
  344.         * Full color ANSI graphics support
  345.         * User on-line time modification   
  346.         * Auto-hang-up (halt_program := TRUE) at time<1
  347.         * System messages in status bar  ("SysOp : User is being paged.")
  348.         * Ability to EASILY add support for ANY BBS system
  349.         * Ability to be run in multi-tasking environments such as
  350.           DESQVIEW and WINDOWS.
  351.         * Local disable/enable of remote user keyboard
  352.  
  353.  
  354.                                                      (continued next page)
  355.  
  356.  
  357.  
  358.  
  359. Triumph Software - TriDoor Documentation                                pg. 003
  360.  
  361.  
  362.         * Fake line-noise from local console
  363.         * Ability to use non-standard IRQ/COMM port configurations
  364.         * Ability to change all communications parameters
  365.         * Locked communications port support
  366.         * Complete flow control support (XON/XOFF and CTS/RTS)
  367.         * Configurable/disableable user keyboard time-out feature
  368.         * Messages such as "Entering chat mode." can now be changed
  369.         * Configurable return to normal status bar after nn seconds
  370.         * Procedure naming conventions similar to Turbo Pascal's
  371.         * Efficient, fast, operation
  372.         * ANSI capable display_file() procedure
  373.         * Ability to disable local screen from program or [F9]
  374.         * PCBoard convention SysOp local control command keys
  375.         * A built-in DOS shell
  376.  
  377.  
  378.                                                 ... And more!
  379.  
  380.  
  381. Triumph Software - TriDoor Documentation                                pg. 004
  382.  
  383.  
  384.  
  385.  
  386.  
  387.                           WHAT'S NEW THIS VERSION
  388.  
  389.  
  390.      While being  rather cliche, I  think an  easier question in  this case
  391.    would be  "What  ISN'T new  on this version?"   The answer  being "Not a
  392.    heck of a lot."
  393.  
  394.      I have  been meaning to  do a lot  of these revisions and improvements
  395.    for  quite some time now, but higher responsibilities within the company
  396.    and my own  life often  drag me behind.  After some back-breaking effort
  397.    and a few sleepless nights, however, here it is.
  398.  
  399.      First and foremost are the fees.  I have reduced  them to staggeringly
  400.    low values of $15.00  for the private copy and $30.00 for the commercial
  401.    copy.  Economy?  Fit of niceness?  General  insanity?  Who knows?   Just
  402.    enjoy it... and register!
  403.  
  404.      The worst  and best news is  that all of the procedures, functions and
  405.    variable  names  have been changed;  getinput() has become  td_readln(),
  406.    print() has  become td_writeln() and so on.  While this is going to take
  407.    a little elbow grease and a good global-replace session for some of you,
  408.    for those of you just starting, it will make life a lot easier.
  409.  
  410.      I have  also  added  a  configurable  and  disableable  user  keyboard
  411.    inactivity  time-out feature.  A very nice addition  since otherwise the
  412.    user could  sit there  for  forty-five  minutes and  never hit a key and
  413.    simply tie up the line.
  414.  
  415.      I have  also  made a  minor  modification  that  simply  restores your
  416.    status-bar at the bottom of  the local screen after a  number of seconds
  417.    which you  can set.  While this is a minor thing, it is nice since noone
  418.    really  wants to know  that you  have to  hit Escape  to  exit chat mode
  419.    thirty minutes after you have left the session.
  420.  
  421.      The  SysOp  keys  have  also  been  modified  to comply  with  PCBoard
  422.    conventions.  There  are  two reasons  for  this : one is that I like it
  423.    better and  I think PCBoard  is excellent, and two is that more and more
  424.    doors are accepting this convention.
  425.  
  426.      All  of the  procedures and  functions have  been streamlined.  I have
  427.    removed, blended,  combined  and  added  certain processes and functions
  428.    in order  to make  the program  faster  and more compact.  Most will not
  429.    notice a difference until they get up into the higher speeds.
  430.  
  431.      Also new  are the  built-in local DOS shell and the ability to disable
  432.    the local screen.  This  screen  disable  function  is  often  handy for
  433.    people  running  multiple  nodes and can  be done through [F9] or in the
  434.    program itself.
  435.  
  436.  
  437. Triumph Software - TriDoor Documentation                                pg. 005
  438.  
  439.  
  440.      Finally  is the  ability  to  change  such  messages as "Entering chat
  441.    mode."  In the future you may  be able to use actual text and ANSI files
  442.    for these, but at the moment you are limited to 255 characters.
  443.  
  444.      While there  are more slight changes and modifications here and there,
  445.    writing them all would take the rest of this document, so I would simply
  446.    advise  reading the rest  of the  document since  that is where you will
  447.    find them.
  448.  
  449.  
  450. Triumph Software - TriDoor Documentation                                pg. 006
  451.  
  452.  
  453.  
  454.                    4.0  STANDARD PROGRAMMING PROCEDURES
  455.  
  456.                        4.1  Programming with TriDoor
  457.  
  458.  
  459.      Creating doors  with TriDoor is  an astoundingly simple  process but a
  460.    couple  steps must  be taken in  each program you write in order for the
  461.    program to function  normally.  The  computer may  physically  "hang" if
  462.    these  few following procedures are not completed (but will usually just
  463.    drop out  with  a complaint  about not  being  able to set-up properly.)
  464.    Once you have  gone through these procedures you then may use any of the
  465.    commands  listed in the  command summary just  as you would normal Turbo
  466.    Pascal commands.
  467.  
  468.      A very  basic example  of how to set-up a simple program (EXAMPLE.PAS)
  469.    comes with this software package.  While it is very crude and simplistic
  470.    it will be an excellent building block from which you can start.  In the
  471.    future I intend  to release an actual  functioning door which you may do
  472.    with as you please.  This will most  likely  not  be anything  more than
  473.    a BBS phone  number maintenance door, but  it will be more in-depth than
  474.    the example  program included  with this package.  Until then I have put
  475.    a great deal of  effort into  making this document more verbose so as to
  476.    make it even easier to understand how to program with TriDoor.
  477.  
  478.      Despite the  examples and  this manual, however, it  is very important
  479.    that you have a basic understanding of the following Turbo Pascal/Pascal
  480.    features : records, global  variables, constants, functions, procedures,
  481.    loops,  units,  and general  syntax.  Without  these and the other basic
  482.    fundamentals of  Turbo Pascal, you will have a more difficult time using
  483.    this unit.  * This is not  a "let's learn Turbo Pascal"  document!  This
  484.    is a "let's learn TriDoor"  document. *  This is also not a "let's learn
  485.    the fundamentals  of BBS  operation" document,  so  you need to know how
  486.    your system is  set-up and it does help to have a little experience with
  487.    setting up doors as well.
  488.  
  489.      Do not  be discouraged if you feel under-knowleged.  The likelihood is
  490.    that you know more than you realize, and if you even know a small amount
  491.    about  these things,  you  should  be  all set.  Press on!  If something
  492.    confuses you, simply  refer  to the  appropriate  manual  and learn more
  493.    about it.
  494.  
  495.      The following is an actual step-by-step process of what you need to do
  496.    to set up TriDoor with your program :
  497.  
  498.      The very  first thing you must do is declare your TriDoor unit in your
  499.    'uses' declaration  within  your source code.  TriDoor needs to redefine
  500.    some of  Turbo Pascal's  CRT  constants  for  it's  own  use,  so  it is
  501.    important  to declare your TriDoor unit after the CRT unit in all cases.
  502.    These  reassignments will  not affect  your program's  operation  in any
  503.    adverse or noticeable way.
  504.  
  505.      TriDoor  supplies a  global record  variable, {stats}, to you.  In the
  506.    next  portion of  your  program, you  must  fill in all of the fields in
  507.    this record.  This process is done automatically  by  two functions that
  508.    are included  in  the TriDoor  unit : read_dorinfo() and read_pcboard().
  509.  
  510.  
  511. Triumph Software - TriDoor Documentation                                pg. 007
  512.  
  513.  
  514.    These functions  read in  the DORINFO1.DEF  and PCBOARD.SYS door support
  515.    information files, respectively,  and fill  them into the {stats} record
  516.    for you.
  517.  
  518.      If you are  planning  to support  a  BBS software that does not create
  519.    either of  these support  files, you  must  then  fill  in  these values
  520.    by means  of a  like procedure  of  your own.   To  make  it  easier  to
  521.    understand  just  what  we  have done, a copy  of our read_dorinfo() and
  522.    read_pcboard()  functions  have been  included  with  this  package,  as
  523.    a separate file, called READBBS.DOC.
  524.  
  525.      Remember that if  you are using  non-standard  IRQ settings,  you must
  526.    make it so that your program can determine the  appropriate address from
  527.    another means, such as a  command-line parameter or a configuration file
  528.    of your own.
  529.  
  530.      A list of  TriDoor-defined  global  constants such  as COM1, IRQ3  and
  531.    others  is  listed  in  the  chapter  entitled  GLOBAL CONSTANTS.  These
  532.    constants have addresses assigned to them to make programming easier.
  533.  
  534.      There  are also  many variables accessible  to you  which will  have a
  535.    great deal of affect on  the amount  of control  you have  over TriDoor.
  536.    These are listed in the chapter ACCESSIBLE GLOBAL VARIABLES.
  537.  
  538.      TriDoor also  supplies you with a string variable; <support_path>. The
  539.    functions  read_pcboard()  and  read_dorinfo()  will  look  in  the path
  540.    specified in  this  variable for  the on -line  door support information
  541.    files.  In other  words, if  you fill  in  this  variable  with the path
  542.    where  these files  are available, these  functions  will  look  in that
  543.    directory  for  those files.  This  is very useful because it allows you
  544.    to supply  a  path  to  the  files  instead  of  copying  them  into the
  545.    directory where the door is executed.
  546.  
  547.      The <support_path> global  variable, like  all others, can be altered,
  548.    and  incorporated into  your  own  code  to  suit  your  needs.   It  is
  549.    recommended  that  if you  write procedures for other door support files
  550.    that you use this variable in your function.
  551.  
  552.      One the {stats} record has been successfully filled, all you need then
  553.    do is call  the  Boolean  setup_tridoor()  function.  If  this  function
  554.    returns  a TRUE then  your communications  link  has been setup properly
  555.    and you can then  use any of the  other TriDoor functions and procedures
  556.    as you would a  normal Turbo Pascal command.  If it returns a FALSE then
  557.    you have most  likely supplied  TriDoor with some inaccurate information
  558.    somewhere along  the  way and  the TriDoor functions and procedures will 
  559.    not work until you fix the problem and call the procedure again.
  560.  
  561.      Don't forget  the locked  communications support!  Because  of today's
  562.    high-speed  modems it is  sometimes necessary  to "lock" the  speed from
  563.    your  computer to your  modem at  a higher  rate  than the modems actual 
  564.    connection  to  the  remote  caller.  This  is  done  so   that  optimum 
  565.    performance from your high-speed modem can be obtained.
  566.  
  567.      This  version of  TriDoor has two  new variables to allow for "locked"
  568.    communications  ports.  The  old {stats}.<baud>  has  been  changed   to
  569.    {stats}.<real_baud>  which  is  the    actual   connection   speed.  The
  570.    {stats}.<lock_baud> variable is your  locked communications port setting
  571.  
  572.  
  573. Triumph Software - TriDoor Documentation                                pg. 008
  574.  
  575.  
  576.    or your computer to modem speed.  To support locked communications ports
  577.    you need  only  to  fill in  these two  variables  before   running  the
  578.    setup_tridoor() function.  This topic will be discussed at length in the
  579.    chapter  entitled  LOCKED  COMMUNICATIONS  SUPPORT.   Remember  that any
  580.    door  support information file  reading function  supplied  with TriDoor
  581.    automatically  checks  for  locked  communications  support.   The  only
  582.    exception  being on  how each  given QuickBBS and QuickBBS clone creates
  583.    the DORINFO1.DEF file.  If  it supplies  the locked baud rate like it is
  584.    supposed to do, you will be all set.  Otherwise, you will have to supply
  585.    the baud rate through  another means such  as the aforementioned command
  586.    line parameter or configuration file.
  587.  
  588.      Another very  important thing  is to  keep the stack and heap sizes at
  589.    a size  large or  small enough  to allow  the built-in TriDoor DOS shell
  590.    to function properly.  This is  done  through the $ M compiler directive
  591.    which is  explained in  your Turbo  Pascal manual.  Keep in mind that in
  592.    many cases, the  appropriate values  can  be  gotten  by  a little trial
  593.    and error.  Also keep in  mind that  as your program grows  you may need
  594.    to change  the compiler directives to accommodate  for size and variable
  595.    memory consumption.
  596.  
  597.      That is pretty  much all there  is to programming TriDoor; it's simple
  598.    and straightforward.  Now take  your printed  copy  of this manual (I am
  599.    assuming  that you have printed  it out by now, if you haven't done so I
  600.    would  advise that you do.) and  try  working with  the example  program
  601.    (EXAMPLE.PAS) which I  have  provided  for  you  in  this  package.  Try
  602.    changing or adding a few things and see what you can do.  After you have
  603.    experimented  a few  minutes come  back and  read  the  PROGRAMMING TIPS
  604.    chapter immediately  following  this  one.  It  will further familiarize
  605.    you with some concepts and open your eyes to some completely new ones.
  606.  
  607.  
  608.  
  609. Triumph Software - TriDoor Documentation                                pg. 009
  610.  
  611.  
  612.  
  613.  
  614.  
  615.                          4.2  Programming Tips
  616.  
  617.  
  618.      Here are  several ideas  and concepts  to keep in mind as you program.
  619.    Remember that TriDoor is  very flexible to  allow you to  do pretty much
  620.    what you like  with the commands and make it as personalized as possible
  621.    but due to  this flexibility some  things are not so readily obvious (or
  622.    forced,  for  that  matter) as  they  might  be  in  a  more  structured
  623.    programming environment.
  624.  
  625.       * Remember to check the exit_door() function in every loop.  This
  626.         function  will  check  every  possible  condition  that   would
  627.         indicate  that  the  program needed to halt.  If  you do not do
  628.         this, you  will wind up  with a door that will simply hang when
  629.         a user logs off or runs out of time.
  630.  
  631.       * If you create support for another BBS support  file it is often
  632.         a good idea to  make the procedure a Boolean returning function
  633.         so that  way you can  immediately tell  if there  was a problem
  634.         when  the   program  tried   to  read   the   data.   TriDoor's
  635.         read_dorinfo() function  does  this.  See  the example  program
  636.         (EXAMPLE.PAS) provided with this package to see how it is used.
  637.  
  638.       * Again, if you are creating support for  another BBS, try to use
  639.         the <support_path> variable to allow your program to be present
  640.         in a directory other than the one that your support file is in.
  641.         Refer, once  again,  to  the  read_dorinfo()  function  in  the
  642.         chapter PROGRAMMING WITH TRIDOOR.
  643.  
  644.       * If you want the  local user (SysOp) to  see something  that the
  645.         remoter user (on-line user) does  not, use a  writeln() instead
  646.         of a td_writeln() or  perhaps use TriDoor's statusbar_message()
  647.         routine.
  648.  
  649.       * Remember to check to see if the local screen is disabled before
  650.         using  any non-TriDoor screen  writing function such as write()
  651.         or writeln().
  652.  
  653.       * Try not  to exclude  non-ANSI  graphics  users  from your door.
  654.         Many  people do  not have  ANSI graphics support.  Don't  limit
  655.         yourself and your program.
  656.  
  657.       * Remember that  many bulletin  board systems  run better if they
  658.         stay in  memory while  a door is  run, and some HAVE to stay in
  659.         memory at  all  times.  Keep  this in  mind  when  writing your
  660.         doors and  keep  them small, or break them into modules.  Don't
  661.         put once-a-day-maintenance programs  as  part of the main door,
  662.         etc.
  663.  
  664.       * THINK IT OUT!  If there's something you want to do, but are not
  665.         sure if you  can with TriDoor  then take  a  moment to think it
  666.         through.  I can almost  guarantee you can do it.  If you cannot
  667.         think of a way, give  us a  call and we will give you a hand or
  668.         remedy the problem.
  669.  
  670.  
  671.  
  672. Triumph Software - TriDoor Documentation                                pg. 010
  673.  
  674.  
  675.  
  676.                     5.0  ADVANCED PROGRAMMING PROCEDURES
  677.  
  678.                    5.1  Advanced Programming with TriDoor
  679.  
  680.  
  681.      When you begin going  beyond the realms  of the basic TriDoor features
  682.    made  available  to you,  you then  begin having the need to access some
  683.    of the global variables and records.
  684.  
  685.      You also  need to be  familiar with  certain terms  and concepts which
  686.    will not  only allow  you to  make excellent  communications  procedures
  687.    of your  own, but are also necessary to understand the next few sections
  688.    of this document.  You should  read this section whether or not you plan
  689.    to attempt  this because it  will also  allow you a better understanding
  690.    of how TriDoor works.
  691.  
  692.      The first  thing  you  should  understand  is the concept of a halting
  693.    condition.  A halting  condition is  a defined  number  of possibilities
  694.    that  form  together  in  various  combinations  that  indicate that the
  695.    program  should be stopped.  An  example  of  this  is when a carrier is
  696.    dropped.  Because the  program was  not  in local operation (which means
  697.    that the variable  {toggle}.<user_local> was  set to FALSE at some point
  698.    during startup) and  the carrier  had been dropped (which means that the
  699.    TriDoor function  carrier_detect() returned a FALSE) the program is then
  700.    expected to  come to a halt.  It is  important to also keep in mind that
  701.    there  is  one  Boolean  variable,  {toggle}.<halt_program>,  which  has
  702.    priority  over  all other halting conditions.  That is, if this variable
  703.    is set to true, no  matter  what  other  conditions  say, the program is
  704.    expected   to  drop  out  immediately.  TriDoor's  exit_door()  function
  705.    automatically  checks  these  variables, in  order of  priority,  at all
  706.    times.  It  is  important  to  check  this  procedure  in  all  of  your
  707.    customized door procedures and functions.
  708.    
  709.      Another thing that is important  to understand is that, at some times,
  710.    the Boolean  variable  {toggle}.<disable_screen>  will  be set by either
  711.    a  local  command-keypress  ([F9]) or  by your  own program.  This means
  712.    that the  SysOp does not  want the screen to be updated until the screen
  713.    is re-enabled.  It is  important  to  monitor  this  toggle whenever you
  714.    plan on writing to the local screen.  All  TriDoor  output  functions do
  715.    this automatically, but Turbo Pascal's write() and writeln() do not!
  716.  
  717.  
  718.  
  719. Triumph Software - TriDoor Documentation                                pg. 011
  720.  
  721.  
  722.                     
  723.  
  724.  
  725.                     5.2  Locked Communications Support
  726.  
  727.  
  728.      It is very  important to support  locked communications support in any
  729.    software that you plan to release to the public.  If you  do not  a fair
  730.    amount of  people with  high-speed modems will  not be  able to use your
  731.    package or will simply not bother to try.
  732.  
  733.      If you  are  running  PCBoard 14.x or any  other BBS  that  supplies a
  734.    compatible  PCBOARD.SYS  file  then  you  should  not  have  to  concern
  735.    yourself  with this  issue  because  read_pcboard()  will  automatically
  736.    handle any values  necessary to set this support up.  If you run another
  737.    BBS,  however,  different scenarios  may  apply.  Some  of  these are as
  738.    follows:
  739.  
  740.      If  you  are  running   QuickBBS  or  another  BBS  that   supplies  a
  741.    DORINFOx.DEF file  you MAY  have  to supply TriDoor with the locked baud
  742.    rate  through some  other means  such  as  a  configuration  file  or  a
  743.    parameter.  Never hard code the locked baud rate because others may want
  744.    to change it.  All  other information  will be  filled in  automatically
  745.    by read_dorinfo().  SOME QuickBBS clones provide the locked baud rate in
  746.    the normal baud rate field.
  747.  
  748.      If you are running any other BBS there are two possible scenarios.  If
  749.    your  BBS supplies  you with  the  locked  port information in it's door
  750.    support   file   then   you   may  simply  read  it  in  like  TriDoor's
  751.    read_pcboard() does. If your BBS does not supply you  with the necessary
  752.    information you must obtain the information from a configuration file or
  753.    command line parameter as in the case of a DORINFOx.DEF support file.
  754.  
  755.  
  756.  
  757. Triumph Software - TriDoor Documentation                                pg. 012
  758.                               
  759.  
  760.  
  761.  
  762.  
  763.                      5.3  Creating Your Own Door Support
  764.                               
  765.  
  766.      This is a  copy of  the  read_dorinfo() function which is incorporated
  767.    directly into the TriDoor package.  It is supplied to you as a reference
  768.    for creating your own BBS support functions.
  769.  
  770.     {* * * * * * * * *}
  771.  
  772.     function read_dorinfo : Boolean;
  773.  
  774.     { reads a users stats from the file DORINFO1.DEF and returns false if }
  775.     { the file was not found in the path stored in support_path           }
  776.  
  777.     var
  778.       deffile: text;            {* pointer to the file DORINFO1.DEF *}
  779.       i,
  780.       loop1,
  781.       loop2  : integer;         {* local indexing loops *}
  782.       comst,
  783.       filler : string;          {* temporary work strings *}
  784.       work1,
  785.       work2  : string[40];      {* short temporary work strings *}
  786.  
  787.     begin { read_dorinfo }
  788.  
  789.              {* if the file was found... *}
  790.  
  791.       if fsearch(mainpath+'DORINFO1.DEF','') <> '' then
  792.         begin
  793.  
  794.           assign(deffile,mainpath+'DORINFO1.DEF');  {* assign & reset file *}
  795.           reset(deffile);
  796.  
  797.           for loop := 1 to 4 do   {* get rid of some un-needed strings *}
  798.             readln(deffile,filler);
  799.  
  800.           case filler[4] of          {* determine comm port *}
  801.             '0' : stats.comport := 0;
  802.             '1' : stats.comport := COM1;
  803.             '2' : stats.comport := COM2;
  804.             '3' : stats.comport := COM3;
  805.             '4' : stats.comport := COM4;
  806.           end;
  807.  
  808.           readln(deffile,stats.comstr); {* read in '1200 N,8,1' type string *}
  809.  
  810.           readln(deffile,filler);          {* ignore un-needed string *}
  811.  
  812.           readln(deffile,work1);     {* read in user's first and last name *}
  813.           readln(deffile,work2);
  814.  
  815.  
  816. Triumph Software - TriDoor Documentation                                pg. 013
  817.  
  818.  
  819.           readln(deffile,filler);          {* ignore un-needed string *}
  820.  
  821.           readln(deffile,i);            {* read in ANSI/non-ANSI *}
  822.  
  823.           readln(deffile,filler);          {* ignore un-needed string *}
  824.  
  825.           readln(deffile,stats.time);      {* read in user time *}
  826.  
  827.           close(deffile);              {* close file, done reading *}
  828.  
  829.           stats.name := work +' '+work2;   {* make a name into a full name *}
  830.  
  831.           work1 := '';
  832.           loop2 := 0;
  833.           loop1 := length(stats.comstr);
  834.  
  835.          {* search the '1200 N,8,1' style string up to the first space *}
  836.  
  837.           while (loop2<loop1) and (ord(stats.comstr[loop2+1]) <> 32) do
  838.             begin
  839.               loop2 := loop2 + 1;
  840.               work1 := work1 + stats.comstr[loop2];
  841.             end;
  842.  
  843.           val(work1,stats.real_baud,loop);
  844.  
  845.                        {* get the value of the string and    *}
  846.                        {* store it into the baud rate value  *}
  847.  
  848.           if i = 1 then stats.ansi := TRUE  {* assign stats.ansi toggle *}
  849.             else stats.ansi := FALSE;
  850.  
  851.           i := pos('BAUD',stats.comstr); {* get position of the word 'BAUD' *}
  852.           i := i + 5;                    {* for reference to next procedure *}
  853.  
  854.           work1 := copy(stats.comstr,i,1);  {* get parity *}
  855.           case work1[1] of
  856.             'N' : stats.comp_parity := NONE;
  857.             'E' : stats.comp_parity := EVEN;
  858.             'O' : stats.comp_parity := ODD;
  859.             'M' : stats.comp_parity := MARK;
  860.             'S' : stats.comp_parity := SPACE;
  861.           end;
  862.  
  863.           val(copy(stats.comstr,i + 3,1),loop1,loop2);   {* get data bits *}
  864.           stats.comp_dbits := loop1;
  865.  
  866.           val(copy(stats.comstr,i + 5,1),loop1,loop2);   {* get stop bits *}
  867.           stats.comp_sbits := loop1;
  868.  
  869.           read_dorinfo := true;       {* we were successful, return a true *}
  870.         end
  871.       else read_dorinfo := false;      {* file not found, return a false *}
  872.  
  873.     end;  { read_dorinfo }
  874.  
  875.     {* * * * * * * * *}
  876.  
  877.  
  878. Triumph Software - TriDoor Documentation                                pg. 014
  879.  
  880.  
  881.  
  882.  
  883.  
  884.                       6.0  STANDARD COMMAND SUMMARY
  885.  
  886.  
  887.  
  888.      The following pages are a list of main commands made accessible to the
  889.    programmer  by  TriDoor.  These  commands  are  those  that  are  needed
  890.    primarily and should accommodate to your every communications need.
  891.  
  892.      Additional,  more  advanced,  commands  are   also  available  to  the
  893.    programmer for use when programming alternates or substitutes to some of
  894.    TriDoor's  main commands.  These  commands  are in the  section entitled
  895.    ADVANCED COMMAND SUMMARY.
  896.  
  897.  
  898.  
  899. Triumph Software - TriDoor Documentation                                pg. 015
  900.  
  901.                                                                   direct_gotoxy
  902.  
  903.     Synopsis
  904.  
  905.         procedure direct_gotoxy( x,y : integer );
  906.  
  907.     Description
  908.  
  909.         This procedure will position the screen memory cursor position
  910.         in the place in memory relative to the position <x>,<y> on the
  911.         actual screen.  This procedure only affects the local screen.
  912.  
  913.         If the program does  not set the direct screen memory position
  914.         by calling on the  direct_gotoxy() procedure, the  direct_char
  915.         and  direct_strg()  functions  will   resume   where  the last
  916.         execution of a direct output function left off.
  917.  
  918.         ** Remember that if the variable <toggle.disable_screen> is set
  919.            to TRUE, no output will be displayed on the local console! **
  920.  
  921.     Example
  922.  
  923.         begin
  924.           direct_gotoxy( 0, 24 );
  925.           direct_strg( '[F1] Help 1 [F2] Help 2', 112);
  926.         end;
  927.  
  928.     Variables
  929.  
  930.         direct_xypos
  931.         toggle.disable_screen
  932.  
  933.     See Also
  934.  
  935.         direct_strg, direct_char
  936.         ansi_gotoxy
  937.  
  938.  
  939. Triumph Software - TriDoor Documentation                                pg. 016
  940.  
  941.                                                                     direct_char
  942.  
  943.     Synopsis
  944.  
  945.         procedure direct_char( d_char : char; d_attr : integer );
  946.  
  947.     Description
  948.  
  949.         This procedure will place the character <d_char> directly into
  950.         screen memory, and  therefore, on the  screen  in the position
  951.         relative  to  the  memory  location  stored  in  the  variable
  952.         <direct_xypos>.  This  position  can  be   set  by  using  the
  953.         procedure direct_gotoxy().
  954.  
  955.         The <d_attr>  variable is  the color  setting of the character
  956.         you are about to display.  It is a very useful parameter since
  957.         it  will  allow  you  to  create  any   color  combination  of
  958.         background and foreground colors with just one number.
  959.  
  960.         For a  color-coded  listing  of these  colors,  as  well as an
  961.         example of how to determine what number  corresponds with what
  962.         color,  run  the  program  DISPATTR.EXE, included   with  this
  963.         package.
  964.  
  965.         If the program does not set the direct screen  memory position
  966.         by calling on the direct_gotoxy() procedure, the direct_char()
  967.         and  direct_strg()  functions  will  resume   where  the  last
  968.         execution of a direct output function left off.
  969.  
  970.         ** Remember that if the variable <toggle.disable_screen> is set
  971.            to TRUE, no output will be displayed on the local console! **
  972.  
  973.     Example
  974.  
  975.         begin
  976.           direct_gotoxy( 1, 10 );
  977.           direct_char( 'A', 7 );      {* write a character at 1,10 *}
  978.           direct_char( 'B', 7 );      {* write another character at 2, 10 *}
  979.         end;
  980.  
  981.     Variables
  982.  
  983.         direct_xypos
  984.         toggle.disable_screen
  985.  
  986.     See Also
  987.  
  988.         direct_gotoxy, direct_strg
  989.         ansi_gotoxy
  990.  
  991.  
  992. Triumph Software - TriDoor Documentation                                pg. 017
  993.  
  994.                                                                   direct_string
  995.  
  996.     Synopsis
  997.  
  998.         procedure direct_string( d_strg : string; d_attr : integer  );
  999.  
  1000.     Description
  1001.  
  1002.         This procedure  is identical  to  direct_char() except that it
  1003.         will  allow you to display an entire string  instead of just a
  1004.         single character.
  1005.  
  1006.         The <d_attr> variable  is  the  color setting of the character
  1007.         your are about to display. It is a very useful parameter since
  1008.         it  will  allow  you  to  create   any  color  combination  of
  1009.         background and foreground colors with just one number.
  1010.  
  1011.         For  a  color-coded  listing  of  these  colors, as well as an
  1012.         example of how to  determine what number corresponds with what
  1013.         color,  run  the  program  DISPATTR.EXE,  included  with  this
  1014.         package.
  1015.  
  1016.         If the program does not set the direct screen  memory position
  1017.         by calling on the direct_gotoxy() procedure, the direct_char()
  1018.         and  direct_strg()  functions  will  resume   where  the  last
  1019.         execution of a direct output function left off.
  1020.  
  1021.         ** Remember that if the variable <toggle.disable_screen> is set
  1022.            to TRUE, no output  will be displayed on the local console! **
  1023.  
  1024.     Example
  1025.  
  1026.         begin
  1027.           direct_gotoxy( 1, 5 );
  1028.           direct_strg( 'This is an exciting example : ', 7 ); {* write at 1,5 *}
  1029.           direct_strg( 'SEE?!', 7 );    {* continue right after prev. *}
  1030.         end;
  1031.  
  1032.     Variables
  1033.  
  1034.         direct_xypos
  1035.         toggle.disable_screen
  1036.  
  1037.     See Also
  1038.  
  1039.         direct_gotoxy, direct_char
  1040.         ansi_gotoxy
  1041.  
  1042.  
  1043. Triumph Software - TriDoor Documentation                                pg. 018
  1044.  
  1045.                                                                         set_cts
  1046.  
  1047.     Synopsis
  1048.  
  1049.         procedure set_cts( cts_on : Boolean );
  1050.  
  1051.     Description
  1052.  
  1053.         This  procedure  enables   and  disables  the  active  modem's
  1054.         hardware flow control. Hardware flow control is very important
  1055.         for proper modem  operation, especially in the  case of modems
  1056.         operating at speeds over 2400 baud.
  1057.  
  1058.         This  procedure  is  automatically  handled  and  executed  by
  1059.         TriDoor.
  1060.  
  1061.         The default setting for the flow control is on. (TRUE)
  1062.  
  1063.     Example
  1064.  
  1065.         begin 
  1066.           set_cts( TRUE );
  1067.         end;
  1068.  
  1069.     Variables
  1070.  
  1071.         none
  1072.  
  1073.     See Also
  1074.  
  1075.         cts_true
  1076.  
  1077.  
  1078. Triumph Software - TriDoor Documentation                                pg. 019
  1079.  
  1080.                                                                        cts_true
  1081.  
  1082.     Synopsis
  1083.  
  1084.         function cts_true : Boolean;
  1085.  
  1086.     Description
  1087.  
  1088.         This function polls the modem and returns a Boolean TRUE if it
  1089.         is clear to send.
  1090.  
  1091.         This  function is  automatically monitored by all of TriDoor's
  1092.         output functions and procedures.
  1093.  
  1094.     Example
  1095.  
  1096.         begin
  1097.           while ( not cts_true ) do;   (* Loop while the modem is not ready *)
  1098.           writeln( 'Modem is now ready for character.' );
  1099.         end;
  1100.  
  1101.     Variables
  1102.  
  1103.         none
  1104.  
  1105.     See Also
  1106.  
  1107.         set_cts
  1108.  
  1109.  
  1110. Triumph Software - TriDoor Documentation                                pg. 020
  1111.  
  1112.                                                                  carrier_detect
  1113.  
  1114.     Synopsis
  1115.  
  1116.         function carrier_detect( comm_port : integer ) : Boolean;
  1117.  
  1118.     Description
  1119.  
  1120.         This  function  will  return  a  Boolean  TRUE if a carrier is
  1121.         detected at the communications port comm_port.
  1122.  
  1123.         Global constants  for communications ports  are made available
  1124.         by  this  TriDoor.  They  are  COM1,  COM2,  COM3   and  COM4;
  1125.         representing the four main-stream ports used by PCs.
  1126.  
  1127.         This function is constantly checked within TriDoor, but if you
  1128.         create a  new  procedure, you may find it necessary to monitor
  1129.         this function.  The  optimum  alternative  is  to  monitor the
  1130.         exit_door  function instead, however, since it also checks the 
  1131.         halt_program  Boolean variable,  and  also  takes into account
  1132.         whether or not the user is  in local mode. (There may not be a
  1133.         carrier, but if the user on-line is in local mode, there is no
  1134.         reason to  drop them  out of the program, and thus exit_door()
  1135.         would return a FALSE.)
  1136.  
  1137.     Example
  1138.  
  1139.         begin
  1140.           if ( carrier_detect( stats.comport ) ) then
  1141.             writeln( 'There is a carrier present.' )
  1142.           else writeln( 'There is no carrier present.' );
  1143.         end;
  1144.  
  1145.     Variables
  1146.  
  1147.         stats.comport
  1148.         COM1, COM2, COM3, COM4  (constants)
  1149.  
  1150.     See Also
  1151.  
  1152.         exit_door
  1153.  
  1154.  
  1155. Triumph Software - TriDoor Documentation                                pg. 021
  1156.  
  1157.                                                                   setup_tridoor
  1158.  
  1159.     Synopsis
  1160.  
  1161.         function setup_tridoor : Boolean;
  1162.  
  1163.     Description
  1164.  
  1165.         This function  performs  all  the necessary setup routines for
  1166.         operation  of your  door.  It returns a Boolean TRUE if it did
  1167.         so without any  problems, and a  FALSE if there was some error
  1168.         in setup.  Errors  are usually  caused by trying to set up the
  1169.         wrong  communications  port,  baud  rate, or   other  critical
  1170.         information.
  1171.  
  1172.         Before this  routine is  called, your program must fill in the
  1173.         <stats> record with all appropriate  settings.   This is where
  1174.         setup_tridoor  will  look for  baud rate, communications port,
  1175.         IRQ settings, and more.  For further information regarding the
  1176.         stats  record  see  the  chapters  entitled ACCESSIBLE  GLOBAL
  1177.         VARIABLES and PROGRAMMING WITH TRIDOOR.
  1178.  
  1179.         TriDoor  also  provides  you  with two functions which fill in
  1180.         this record, automatically, from  two different bulletin board
  1181.         system door support files.  These functions are read_dorinfo()
  1182.         and read_pcboard(), and they read  in the necessary  data from
  1183.         the files DORINFO1.DEF and PCBOARD.SYS, respectively.
  1184.  
  1185.         ** If you do not call the setup_tridoor() procedure, all other
  1186.            TriDoor functions and  procedures will not operate properly,
  1187.            and may cause your system to lock up! **
  1188.  
  1189.     Example
  1190.  
  1191.         begin
  1192.           if ( read_pcboard ) then
  1193.             begin
  1194.               if ( setup_tridoor ) then
  1195.                 begin
  1196.                   (* main door operation here *)
  1197.                 end
  1198.               else writeln( 'ERROR : TriDoor could not  set up comm port.' );
  1199.             end
  1200.           else writeln( 'ERROR : PCBOARD.SYS not found.' );
  1201.         end;
  1202.  
  1203.     Variables
  1204.  
  1205.         stats (record)
  1206.  
  1207.     See Also
  1208.  
  1209.         read_pcboard, read_dorinfo
  1210.  
  1211.  
  1212. Triumph Software - TriDoor Documentation                                pg. 022
  1213.  
  1214.                                                                       exit_door
  1215.  
  1216.     Synopsis
  1217.  
  1218.         function exit_door : Boolean;
  1219.  
  1220.     Description
  1221.  
  1222.         This  function  will  check   the  carrier   on   the  current
  1223.         communications port,the value of the <toggle.halt_program> and
  1224.         <toggle.user_local> Boolean  variables,  and  the on-line user
  1225.         time statistics.  From  all  of  these values, the exit_door()
  1226.         function automatically  determines whether or  not the on-line
  1227.         user should be dropped out of the program.
  1228.  
  1229.         The order  of halting  condition precedence  is : halt, local,
  1230.         carrier.
  1231.  
  1232.         In  other  words,  no  matter  what  conditions   prevail,  if
  1233.         <toggle.halt_program> is TRUE, exit_door() will return a TRUE.
  1234.         If the   function  carrier_detect   returns    a   FALSE,  but
  1235.         <toggle.user_local> is TRUE then exit_door will return a FALSE.
  1236.         etc.
  1237.  
  1238.         The following is  a table  that shows the results of a call to
  1239.         the exit_door function under all possible circumstances.
  1240.  
  1241.     Example
  1242.  
  1243.         var
  1244.           name_strg : string[35];
  1245.  
  1246.         begin
  1247.           td_writeln( 'Please enter your name after the prompt.' );
  1248.           td_writeln( 'Your name must be longer than three characters.||' );
  1249.  
  1250.           while ( length( name_strg ) < 3 ) and ( not exit_door ) do
  1251.             begin
  1252.               td_writeln( '||Enter your name : ' );
  1253.               td_readln( name_strg, 35, CAPS_ON,  CODE_OFF );
  1254.               if ( length( name_strg ) < 3 ) then
  1255.                 td_writeln( '||Your name must be more than 3 chars!||' );
  1256.             end;
  1257.           end;
  1258.  
  1259.     Variables
  1260.  
  1261.         toggle.halt_program, toggle.user_local, toggle.inactivity_timeout
  1262.  
  1263.     See Also
  1264.  
  1265.         carrier_detect
  1266.         time_until_timeout, time_remaining
  1267.         display_time
  1268.  
  1269.  
  1270. Triumph Software - TriDoor Documentation                                pg. 023
  1271.  
  1272.                                                                            strg
  1273.  
  1274.     Synopsis
  1275.  
  1276.         function  strg( in_value : longint ) : string;
  1277.  
  1278.     Description
  1279.  
  1280.         This  function will  take any value given  to it as <in_value>
  1281.         and will return a string representation of that value.
  1282.  
  1283.     Example
  1284.  
  1285.         var
  1286.           int_val : integer;
  1287.           long_val : longint;
  1288.           temp_strg : string;
  1289.  
  1290.         begin
  1291.           temp_strg := strg( long_val );
  1292.           td_writeln( 'The value of the long int is : ' + temp_strg + '||'  );
  1293.           temp_strg := strg( int_val );
  1294.           temp_strg := temp_strg + ' is the value of the standard integer.';
  1295.           td_writeln( temp_strg + '||' );
  1296.           td_writeln( 'The value of the sum of ' + strg( long_val ) + ' and ' +
  1297.           strg( int_val ) + ' is ' + strg( long_val + int_val ) + '.||' );
  1298.         end;
  1299.  
  1300.     Variables
  1301.  
  1302.         none
  1303.  
  1304.     See Also
  1305.  
  1306.         td_upcase, capitalize
  1307.  
  1308.  
  1309. Triumph Software - TriDoor Documentation                                pg. 024
  1310.  
  1311.                                                                       td_upcase
  1312.  
  1313.     Synopsis
  1314.  
  1315.         function td_upcase( in_strg : string ) : string;
  1316.  
  1317.     Description
  1318.  
  1319.         This function is TriDoor's replacement for/supplement to Turbo
  1320.         Pascal's upcase() command.  The  difference  being  that  this
  1321.         function  will capitalize  an  entire  string and not just one
  1322.         character.
  1323.  
  1324.     Example
  1325.  
  1326.         var
  1327.           bbs_name : string;
  1328.  
  1329.         begin
  1330.           write( 'Please enter the name of this BBS : ' );
  1331.           readln( bbs_name );
  1332.           bbs_name := td_upcase( bbs_name );
  1333.           writeln('You have entered ', bbs_name, ' as the name of this BBS.' );
  1334.         end;
  1335.  
  1336.     Variables
  1337.  
  1338.         none
  1339.  
  1340.     See Also
  1341.  
  1342.         strg, capitalize
  1343.  
  1344.  
  1345. Triumph Software - TriDoor Documentation                                pg. 025
  1346.  
  1347.                                                                      capitalize
  1348.  
  1349.     Synopsis
  1350.  
  1351.         function capitalize( strg : string ) : string;
  1352.  
  1353.     Description
  1354.  
  1355.         Don't let  the name  of this function  fool you; it does a lot
  1356.         more  than  just  convert  everything  into  upper-case.  This
  1357.         function will return a string with every first letter of every
  1358.         word capitalized, and all others lower-cased.
  1359.  
  1360.             i.e. 'HURON CAROL' would become 'Huron Carol'.
  1361.             'chris russo' would become 'Chris Russo'.
  1362.             'HoWarD MCgEe' would become 'Howard Mcgee'.
  1363.  
  1364.         (notice that  this  function does not notice prefixes on names
  1365.          like McGee and DuBois.)
  1366.  
  1367.     Example
  1368.  
  1369.         var
  1370.           name_strg : string[35];
  1371.  
  1372.         begin
  1373.           td_writeln( 'Please enter your name : ' );
  1374.           td_readln(  name_strg, 35, CAPS_ON, CODE_OFF );
  1375.           name_strg := capitalize( name_strg );
  1376.           td_writeln( 'Your name will appear as ' + name_strg +
  1377.             ' on this system.||' );
  1378.         end;
  1379.  
  1380.     Variables
  1381.  
  1382.         none
  1383.  
  1384.     See Also
  1385.  
  1386.         td_upcase, strg
  1387.  
  1388.  
  1389. Triumph Software - TriDoor Documentation                                pg. 026
  1390.  
  1391.                                                                       td_clrscr
  1392.  
  1393.     Synopsis
  1394.  
  1395.         procedure td_clrscr;
  1396.  
  1397.     Description
  1398.  
  1399.         This procedure  is  the  TriDoor  communications equivalent of
  1400.         Turbo Pascal's clrscr procedure.  It will clear both the local
  1401.         and remote  screen, if  applicable.  If  ANSI  is  enabled  by
  1402.         setting <stats.ansi> to TRUE this procedure will automatically
  1403.         take advantage of ANSI  screen  clearing by  calling TriDoor's
  1404.         ansi_clrscr() procedure.
  1405.  
  1406.         ** Remember that if the variable <toggle.disable_screen> is set
  1407.         to TRUE, no output  will be displayed on the local console! **
  1408.  
  1409.     Example
  1410.  
  1411.         begin
  1412.           td_clrscr;
  1413.         end;
  1414.  
  1415.     Variables
  1416.  
  1417.         toggle.disable_screen
  1418.  
  1419.     See Also
  1420.  
  1421.         ansi_clrscr
  1422.  
  1423.  
  1424. Triumph Software - TriDoor Documentation                                pg. 027
  1425.  
  1426.                                                                      td_outstrg
  1427.  
  1428.     Synopsis
  1429.  
  1430.         procedure td_outstrg( comm_port : integer;
  1431.                               out_strg  : string;
  1432.                               echo_strg : Boolean  );
  1433.  
  1434.     Description
  1435.  
  1436.         This   procedure  is  a   very basic,  un-filtered,  writeln()
  1437.         equivalent.  It  will  output  the  string <out_strg>  to  the
  1438.         communications port comm_port.  If <echo_strg> is TRUE it will
  1439.         also display the output on the local console.
  1440.  
  1441.         The major differences between TriDoor's td_outstrg() and Turbo
  1442.         Pascal's writeln are as follows :
  1443.  
  1444.         * Inserting variables requires +'s not ,'s.
  1445.  
  1446.           Turbo Pascal  : write( 'TriDoor is a great ' , adj_strg );
  1447.           TriDoor       : td_outstrg( stats.comport, 'TriDoor is a great ' +
  1448.                                       adj_strg, ECHO_ON );
  1449.  
  1450.         * td_outstrg() requires that all values be turned to strings.
  1451.  
  1452.           Turbo Pascal  : write( 'TriDoor Ver ' , TDVER );
  1453.           TriDoor       : td_outstrg( stats.comport, 'TriDoor Ver ' +
  1454.                           strg(TDVER), ECHO_ON );
  1455.  
  1456.         * td_outstrg() will not do a carriage return unless given one.
  1457.           (This reduces the number of commands by a factor of two, and
  1458.            sometimes reduces the number of actual instructions.)
  1459.  
  1460.           Turbo Pascal  : writeln( 'TriDoor is truly amazing!' );
  1461.                           writeln;
  1462.           TriDoor       : td_outstrg( 'TriDoor is truly amazing!'+ CR + CR );
  1463.  
  1464.                (CR is a global constant supplied by TriDoor)
  1465.  
  1466.  
  1467.         * td_oustrg() allows your door program to display a text message
  1468.           to only the remote screen, or to both screens.
  1469.  
  1470.           Turbo Pascal : writeln( 'This will only be displayed on the' );
  1471.                          writeln( ' local screen.' );
  1472.           TriDoor      : td_outstrg( stats.comport, '...only on remote!',
  1473.                                      ECHO_OFF );
  1474.                        : td_outstrg( stats.comport, '...on both screens!',
  1475.                                      ECHO_ON );
  1476.  
  1477.         ** Remember that if the variable <toggle.disable_screen> is set
  1478.         to TRUE, no  output will be displayed on the local console! **
  1479.  
  1480.  
  1481. Triumph Software - TriDoor Documentation                                pg. 028
  1482.  
  1483.                                                                      td_outstrg
  1484.  
  1485.     Example
  1486.  
  1487.         const
  1488.           TDVER  = 3.00;
  1489.           CR   = chr(13) + chr(10);
  1490.  
  1491.         var
  1492.           adj_strg : string;
  1493.  
  1494.         begin
  1495.           td_outstrg( stats.comport, 'TriDoor Ver ' + strg(TDVER), ECHO_ON );
  1496.           td_outstrg( stats.comport, 'TriDoor is ' + adj_strg, ECHO_ON );
  1497.           td_outstrg( stats.comport, 'TriDoor is truly amazing!'+ CR + CR,
  1498.                       ECHO_ON );
  1499.         end;
  1500.  
  1501.     Variables
  1502.  
  1503.         stats.comport
  1504.         toggle.disable_screen
  1505.         CR, BS, ECHO_ON, ECHO_OFF (constants)
  1506.  
  1507.     See Also
  1508.  
  1509.         td_outchar, td_writeln, statusbar_message
  1510.         direct_char, direct_gotoxy
  1511.  
  1512.  
  1513. Triumph Software - TriDoor Documentation                                pg. 029
  1514.  
  1515.                                                                      td_outchar
  1516.  
  1517.     Synopsis
  1518.  
  1519.         procedure td_outchar( comm_port : integer;
  1520.                               outchar   : char;
  1521.                               echo_char : Boolean  );
  1522.  
  1523.     Description
  1524.  
  1525.         This procedure  is identical to td_outstrg() except that it is
  1526.         modified  to accept  only one  character  at a time.  When the
  1527.         programmer  is  sure  that  only  one character will be output,
  1528.         this is a slightly faster procedure to use.
  1529.  
  1530.         I have given the programmer access to this procedure mainly so
  1531.         that if they  would  like to create an alternate or substitute
  1532.         string output  procedure  they can do so without sacrificing a
  1533.         great deal of speed.  However, the  td_outstrg()  procedure is
  1534.         the fastest string output procedure that you can possibly have
  1535.         in  TriDoor  since  it  accesses  the  appropriate  interrupts
  1536.         directly within the procedure. In conclusion,  unless you will
  1537.         be making  a  function  or  procedure   that  has  significant
  1538.         differences from TriDoor's, we advise you just use those given
  1539.         to you.
  1540.  
  1541.         ** Remember that if the variable <toggle.disable_screen> is set
  1542.         to TRUE, no output will  be displayed on the local console! **
  1543.  
  1544.     Example
  1545.  
  1546.         begin
  1547.           td_outchar( stats.comport, 'T', ECHO_ON );
  1548.         end;
  1549.  
  1550.     Variables
  1551.  
  1552.         ECHO_ON, ECHO_OFF (constants)
  1553.  
  1554.     See Also
  1555.  
  1556.         td_writeln, td_outstrg, statusbar_message
  1557.         direct_char, direct_gotoxy
  1558.  
  1559.  
  1560. Triumph Software - TriDoor Documentation                                pg. 030
  1561.  
  1562.                                                                      td_writeln
  1563.  
  1564.     Synopsis
  1565.  
  1566.         procedure td_writeln( strg : string );
  1567.  
  1568.     Description
  1569.  
  1570.         This is the more refined version  of td_outstrg().  It is much
  1571.         easier   to   use    since  it  refers    to    the   variable
  1572.         <toggle.td_writeln_echo> to determine whether  or not the text
  1573.         should be echoed to  the local console.  It also automatically
  1574.         assumes that you will be using <stats.comport> as your default
  1575.         communications port.
  1576.  
  1577.         In addition to these benefits, it also allows you to replace a
  1578.         '+CR+' with a '||' to represent a carriage return.
  1579.  
  1580.         * For example :
  1581.  
  1582.             td_outstrg( stats.comport, 'This manual is long.' + CR +
  1583.                         'I enjoy reading'+CR, ECHO_ON );
  1584.  
  1585.             can be replaced by...
  1586.  
  1587.             td_writeln( 'This manual is long.||I enjoy reading.||' );
  1588.  
  1589.         * You can also link together carriage returns :
  1590.  
  1591.             td_writeln( 'Another example.||||How riveting.||' );
  1592.  
  1593.             This would produce  'Another example.'
  1594.                                 ''
  1595.                                 'How riveting.'
  1596.  
  1597.         ** Remember that if the variable <toggle.disable_screen> is set
  1598.         to TRUE, no output will  be displayed on the local console! **
  1599.  
  1600.     Example
  1601.  
  1602.         begin
  1603.           td_writeln( 'This manual is long.||I enjoy reading.||' );
  1604.           td_writeln( 'Another example.||||How riveting.||' );
  1605.         end;
  1606.  
  1607.     Variables
  1608.  
  1609.         toggle.td_writeln_echo, toggle.disable_screen
  1610.         CR ( constant )
  1611.  
  1612.     See Also
  1613.  
  1614.         td_outchar, td_outstrg, statusbar_message
  1615.         direct_char, direct_gotoxy
  1616.  
  1617.  
  1618. Triumph Software - TriDoor Documentation                                pg. 031
  1619.  
  1620.                                                               statusbar_message
  1621.  
  1622.     Synopsis
  1623.  
  1624.         procedure statusbar_message( message_strg : string );
  1625.  
  1626.     Description
  1627.  
  1628.         This procedure  will display  the message  passed to it in the
  1629.         variable <message_strg> in the status  bar  window.  It  is an
  1630.         excellent  way  for your program to communicate with the SysOp
  1631.         without allowing the user see the message as well.
  1632.  
  1633.         ** Remember that if the variable <toggle.disable_screen> is set
  1634.         to TRUE, no output  will be displayed on the local console! **
  1635.  
  1636.     Example
  1637.  
  1638.         begin
  1639.           statusbar_message( 'Press [ESC] at any time to exit chat mode.' );
  1640.         end;
  1641.  
  1642.     Variables
  1643.  
  1644.         toggle.disable_screen
  1645.  
  1646.     See Also
  1647.  
  1648.         display_statusbar, display_helpbar_1, display_helpbar_2
  1649.  
  1650.  
  1651. Triumph Software - TriDoor Documentation                                pg. 032
  1652.  
  1653.                                                                   td_keypressed
  1654.  
  1655.     Synopsis
  1656.  
  1657.         function td_keypressed : Boolean;
  1658.  
  1659.     Description
  1660.  
  1661.         This  is  the TriDoor   communications   equivalent   of Turbo
  1662.         Pascal's keypressed() function. It will check the input buffer
  1663.         to determine whether or  not a  key has  been pressed and sent
  1664.         from the remote user and return a Boolean TRUE if there is one
  1665.         waiting.
  1666.  
  1667.         This function does not acknowledge local key presses.
  1668.  
  1669.     Example
  1670.  
  1671.         var
  1672.          in_key : char;
  1673.  
  1674.         begin
  1675.           if ( td_keypressed ) then  {* if a remote key was pressed *}
  1676.             in_key := td_readkey
  1677.  
  1678.           else if ( keypressed ) then  {* if a local key was pressed *}
  1679.             in_key := readkey;
  1680.         end;
  1681.  
  1682.     Variables
  1683.  
  1684.         buffer_top, buffer_head, buffer_tail
  1685.  
  1686.     See Also
  1687.  
  1688.         confirm
  1689.         td_readkey, get_keypress
  1690.         td_readln
  1691.         get_phone, get_date
  1692.  
  1693.  
  1694. Triumph Software - TriDoor Documentation                                pg. 033
  1695.  
  1696.                                                                      td_readkey
  1697.  
  1698.     Synopsis
  1699.  
  1700.         function td_readkey : char;
  1701.  
  1702.     Description
  1703.  
  1704.         This  function  is  the  TriDoor communications  equivalent of
  1705.         Turbo Pascal's readkey() function.  It  will remove and return
  1706.         the next waiting character in the input buffer.
  1707.  
  1708.         This function does not acknowledge local key presses.
  1709.  
  1710.     Example
  1711.  
  1712.         var
  1713.           in_key : char;
  1714.  
  1715.         begin
  1716.           if ( td_keypressed ) then
  1717.             in_key := td_readkey  {* read a key from comm port *}
  1718.     
  1719.           else if ( keypressed ) then
  1720.             in_key := readkey;  {* read a key from local keyboard *}
  1721.         end;
  1722.  
  1723.     Variables
  1724.  
  1725.         buffer_top, buffer_head, buffer_tail
  1726.  
  1727.     See Also
  1728.  
  1729.         confirm
  1730.         td_keypressed, get_keypress
  1731.         td_readln
  1732.         get_phone, get_date
  1733.  
  1734.  
  1735. Triumph Software - TriDoor Documentation                                pg. 034
  1736.  
  1737.                                                                    get_keypress
  1738.  
  1739.     Synopsis
  1740.  
  1741.         function get_keypress : char;
  1742.  
  1743.     Description
  1744.  
  1745.         This function is an enhancement on the previous td_keypressed()
  1746.         and td_readkey()  functions. It will wait for a character to be
  1747.         pressed, either  locally or  remotely, and  then return it.  If
  1748.         <toggle.disable_user_keyboard>  is  set to  TRUE  it  will  not
  1749.         acknowledge remote key presses.
  1750.  
  1751.     Example
  1752.  
  1753.         var
  1754.           in_char : char;
  1755.  
  1756.         begin
  1757.           in_char := get_keypress;
  1758.         end;
  1759.  
  1760.     Variables
  1761.  
  1762.         toggle.disable_user_keyboard, toggle.disable_screen
  1763.         
  1764.     See Also
  1765.  
  1766.         confirm
  1767.         get_phone, get_date
  1768.         td_readln
  1769.         td_readkey, td_keypressed
  1770.  
  1771.  
  1772. Triumph Software - TriDoor Documentation                                pg. 035
  1773.  
  1774. td_readln
  1775.  
  1776.     Synopsis
  1777.  
  1778.         procedure td_readln( input_strg  : string; 
  1779.                              max_length  : word;
  1780.                              caps_lock,
  1781.                              coded_input : Boolean ) : string;
  1782.  
  1783.     Description 
  1784.  
  1785.         This  function  is the  TriDoor near  equivalent  of the Turbo
  1786.         Pascal  readln procedure.  It acknowledges both  the local and
  1787.         remote     keyboards,    unless     the     global    variable
  1788.         toggle.disable_user_keyboard  is set to TRUE.  In such a case,
  1789.         remote keystrokes will be ignored.
  1790.         
  1791.         <toggle.disable_user_keyboard>    is   automatically  set   by
  1792.         TriDoor's special remote function keystroke [ALT]-[F4].
  1793.  
  1794.         There  are  also  some additional  features  mad  available in
  1795.         TriDoor's td_readln() that are not available in Turbo Pascal's
  1796.         readln.
  1797.  
  1798.         * You can set the maximum length of the string in the field
  1799.           <max_length>, or enter the global constant MAXIMUM for no
  1800.           relative maximum.  (Absolute maximum is 255  characters.)
  1801.     
  1802.         * If <caps_lock> is set to TRUE, all input will be instantly
  1803.           forced into upper-case  letters. So if the user types "Lloyd
  1804.           Alexander" they will see, and the procedure will  record
  1805.           "LLOYD ALEXANDER".  TriDoor supplies the global constants
  1806.           CAPS_ON and CAPS_OFF to use in the place of <caps_lock> when
  1807.           calling the  function.
  1808.  
  1809.         * If <coded_input> is set to TRUE, all input will be instantly
  1810.           forced into "*"s.  (asterixes) So if the user types "TERRY
  1811.           BROOKS" they will see "************"  but the procedure will
  1812.           record "TERRY BROOKS" as the input. TriDoor supplies  the
  1813.           global constants CODE_ON and CODE_OFF to use in the place of
  1814.           <coded_input> when calling the function.
  1815.  
  1816.         ** Remember that if the variable <toggle.disable_screen> is set
  1817.         to TRUE, no  output will be displayed on the local console! **
  1818.  
  1819.  
  1820. Triumph Software - TriDoor Documentation                                pg. 036
  1821.  
  1822. td_readln
  1823.  
  1824.     Example
  1825.  
  1826.         var
  1827.           instring_long  : string[80];
  1828.           instring_short : string[30];
  1829.  
  1830.         begin
  1831.           td_writeln( 'Please enter a message : (max 80 chars)||' );
  1832.           td_readln( instring_long, 80, CAPS_OFF, CODE_OFF );
  1833.  
  1834.           td_writeln( 'Please enter your name : (max 30 characters)||' );
  1835.           td_readln( instring_short, 30, CAPS_ON, CODE_OFF );
  1836.  
  1837.           td_writeln( 'Please enter your password : (max 15 characters)||' );
  1838.           td_readln( instring_short, 15, CAPS_ON, CODE_ON );
  1839.         end; 
  1840.  
  1841.     Variables
  1842.  
  1843.         CAPS_ON, CAPS_OFF, CODE_ON, CODE_OFF (constants)
  1844.         toggle.disable_user_keyboard, toggle.disable_screen
  1845.  
  1846.     See Also
  1847.  
  1848.         confirm
  1849.         get_keypress
  1850.         td_readkey, td_keypressed
  1851.         get_phone, get_date
  1852.  
  1853.  
  1854. Triumph Software - TriDoor Documentation                                pg. 037
  1855.  
  1856.                                                                       get_phone
  1857.  
  1858.     Synopsis
  1859.  
  1860.         function get_phone : string;
  1861.  
  1862.     Description
  1863.  
  1864.         This function is a hybrid of the td_readln() procedure that
  1865.         will read in a  formatted phone number  of  the  convention
  1866.         (xxx)xxx-xxxx.
  1867.  
  1868.         ** Remember that if the variable <toggle.disable_screen> is set
  1869.         to TRUE, no output  will be displayed on the local console! **
  1870.  
  1871.     Example
  1872.  
  1873.         var
  1874.           phone_strg : string;
  1875.  
  1876.         begin
  1877.           phone_strg := get_phone;
  1878.         end;
  1879.  
  1880.     Variables
  1881.  
  1882.         toggle.disable_screen
  1883.  
  1884.     See Also
  1885.  
  1886.         confirm
  1887.         get_date
  1888.         td_readln
  1889.         get_keypress
  1890.         td_readkey, td_keypressed
  1891.  
  1892.  
  1893. Triumph Software - TriDoor Documentation                                pg. 038
  1894.  
  1895.                                                                        get_date
  1896.  
  1897.     Synopsis
  1898.  
  1899.         function get_date : string;
  1900.  
  1901.     Description
  1902.  
  1903.         This  function  is a hybrid of the td_readln()  procedure that
  1904.         will read in a formatted date of the convention MM/DD/YY.
  1905.  
  1906.         ** Remember that if the variable <toggle.disable_screen> is set
  1907.         to TRUE, no output  will be displayed on the local console! **
  1908.  
  1909.     Example
  1910.  
  1911.         var
  1912.          date_strg : string;
  1913.  
  1914.         begin
  1915.           date_strg := get_date;
  1916.         end;
  1917.  
  1918.     Variables
  1919.  
  1920.         toggle.disable_screen
  1921.  
  1922.     See Also
  1923.  
  1924.         confirm
  1925.         get_phone
  1926.         td_readln
  1927.         get_keypress
  1928.         td_readkey, td_keypressed
  1929.  
  1930.  
  1931. Triumph Software - TriDoor Documentation                                pg. 039
  1932.  
  1933.                                                                         confirm
  1934.  
  1935.     Synopsis
  1936.  
  1937.         function confirm( question_strg : string;
  1938.                           default       : char    ) : Boolean;
  1939.  
  1940.     Description
  1941.  
  1942.         Confirm() is one of my favorite and most often used extraneous
  1943.         functions.  It takes <question_strg> and appends a '? (Y/[N])'
  1944.         to it if the <default> is 'N' (global  constant NO),  or  a '?
  1945.         ([Y]/N)' if  the  <default>  is  a 'Y' (global  constant YES).
  1946.         Then the  user  must  enter  a  'Y', 'N',  or [RETURN] for the
  1947.         default.
  1948.  
  1949.         If the  global variable <toggle.disable_user_keyboard>  is set
  1950.         to  TRUE, the remote  keystrokes  will be ignored.  Otherwise,
  1951.         this  function  will  acknowledge   both   local   and  remote
  1952.         keystrokes.
  1953.  
  1954.         The function then returns a Boolean TRUE if  the user selected
  1955.         [Y]es, and FALSE if they picked [N]o.
  1956.  
  1957.         The global constants YES and NO are provided by TriDoor.
  1958.  
  1959.         i.e. if confirm('Are you sure you want to explode',YES) then...
  1960.  
  1961.            would produce...
  1962.  
  1963.              'Are you sure you want to explode? ([Y]/N) '
  1964.  
  1965.         ** Remember that if the variable <toggle.disable_screen> is set
  1966.         to TRUE, no output  will be displayed on the local console! **
  1967.  
  1968.     Example
  1969.  
  1970.         begin
  1971.           if confirm( 'Are you sure you want to blow up the earth', NO ) then
  1972.             td_writeln( '||||BOOM!||||' )
  1973.           else td_writeln( '||||Billions of people say "Thank you."||||' );
  1974.         end;
  1975.  
  1976.     Variables
  1977.  
  1978.         toggle.disable_screen, toggle.disable_user_keyboard
  1979.         YES, NO (constants)
  1980.  
  1981.     See Also
  1982.  
  1983.         get_phone, get_date
  1984.         get_keypress
  1985.         td_readln
  1986.         td_readkey, td_keypressed
  1987.  
  1988.  
  1989. Triumph Software - TriDoor Documentation                                pg. 040
  1990.  
  1991.                                                                     ansi_clrscr
  1992.  
  1993.     Synopsis
  1994.  
  1995.         procedure ansi_clrscr;
  1996.  
  1997.     Description
  1998.  
  1999.         This  procedure will  utilize  ANSI  graphics  screen controls
  2000.         clear both the local and remote screens.
  2001.  
  2002.         ** Remember that if the variable <toggle.disable_screen> is set
  2003.         to TRUE, no output  will be displayed on the local console! **
  2004.  
  2005.     Example
  2006.  
  2007.         begin
  2008.           ansi_clrscr;
  2009.         end;
  2010.  
  2011.     Variables
  2012.  
  2013.         stats.ansi
  2014.         toggle.disable_screen
  2015.  
  2016.     See Also
  2017.  
  2018.         ansi_left, ansi_right, ansi_gotoxy, ansi_up, ansi_down,
  2019.         ansi_erase_line, ansi_color
  2020.  
  2021.  
  2022. Triumph Software - TriDoor Documentation                                pg. 041
  2023.  
  2024.                                                                 ansi_erase_line
  2025.  
  2026.     Synopsis
  2027.  
  2028.         procedure ansi_erase_line;
  2029.  
  2030.     Description
  2031.  
  2032.         This procedure  will utilize ANSI  graphics screen controls to
  2033.         erase to  the end of the current line from  the current cursor
  2034.         position on both the local and remote screens.
  2035.  
  2036.         ** Remember that if the variable <toggle.disable_screen> is set
  2037.         to TRUE, no output  will be displayed on the local console! **
  2038.  
  2039.     Example
  2040.  
  2041.         begin
  2042.           ansi_erase_line;
  2043.         end;
  2044.  
  2045.     Variables
  2046.  
  2047.         stats.ansi
  2048.         toggle.disable_screen
  2049.     
  2050.     See Also
  2051.  
  2052.         ansi_left, ansi_right, ansi_gotoxy, ansi_up, ansi_down,
  2053.         ansi_clrscr, ansi_color
  2054.  
  2055.  
  2056. Triumph Software - TriDoor Documentation                                pg. 042
  2057.  
  2058.                                                                     ansi_gotoxy
  2059.  
  2060.     Synopsis
  2061.  
  2062.         procedure ansi_gotoxy( x, y : integer );
  2063.  
  2064.     Description
  2065.  
  2066.         This  procedure will utilize ANSI  graphics screen controls to
  2067.         place  the cursor  at the  position <x>, <y> on  the local and
  2068.         remote screens.
  2069.  
  2070.         ** Remember that if the variable <toggle.disable_screen> is set
  2071.         to TRUE, no output  will be displayed on the local console! **
  2072.  
  2073.     Example
  2074.  
  2075.         begin
  2076.           ansi_gotoxy( 10, 12 );
  2077.         end;
  2078.  
  2079.     Variables
  2080.  
  2081.         stats.ansi
  2082.         toggle.disable_screen
  2083.         
  2084.     See Also
  2085.  
  2086.         ansi_left, ansi_right, ansi_up, ansi_down, ansi_erase_line,
  2087.         ansi_clrscr, ansi_color
  2088.  
  2089.  
  2090.  
  2091. Triumph Software - TriDoor Documentation                                pg. 043
  2092.  
  2093.                                                                       ansi_left
  2094.  
  2095.     Synopsis
  2096.  
  2097.         procedure ansi_left( move : integer );
  2098.  
  2099.     Description
  2100.  
  2101.         This  procedure will utilize ANSI graphics  screen controls to
  2102.         move  the cursor <move> spaces left  on  the  local and remote
  2103.         screens.
  2104.  
  2105.         ** Remember that if the variable <toggle.disable_screen> is set
  2106.         to TRUE, no output  will be displayed on the local console! **
  2107.  
  2108.     Example
  2109.  
  2110.         begin
  2111.           ansi_left( 10 );
  2112.         end;
  2113.  
  2114.     Variables
  2115.  
  2116.         stats.ansi
  2117.         toggle.disable_screen
  2118.  
  2119.     See Also
  2120.  
  2121.         ansi_gotoxy, ansi_right, ansi_up, ansi_down, ansi_erase_line,
  2122.         ansi_clrscr, ansi_color
  2123.  
  2124.  
  2125. Triumph Software - TriDoor Documentation                                pg. 044
  2126.  
  2127.                                                                      ansi_right
  2128.  
  2129.     Synopsis
  2130.  
  2131.         procedure ansi_right( move : integer );
  2132.  
  2133.     Description
  2134.  
  2135.         This procedure  utilize ANSI graphics  screen controls to move
  2136.         the cursor <move> spaces right on the local and remote screens.
  2137.  
  2138.         ** Remember that if the variable <toggle.disable_screen> is set
  2139.         to TRUE, no output  will be displayed on the local console! **
  2140.  
  2141.     Example
  2142.  
  2143.         begin
  2144.           ansi_right( 10 );
  2145.         end;
  2146.  
  2147.     Variables
  2148.  
  2149.         stats.ansi
  2150.         toggle.disable_screen
  2151.  
  2152.     See Also
  2153.  
  2154.         ansi_left, ansi_gotoxy, ansi_up, ansi_down, ansi_erase_line,
  2155.         ansi_clrscr, ansi_color
  2156.  
  2157.  
  2158. Triumph Software - TriDoor Documentation                                pg. 045
  2159.  
  2160.                                                                         ansi_up
  2161.  
  2162.     Synopsis
  2163.  
  2164.         procedure ansi_up( move : integer );
  2165.  
  2166.     Description
  2167.  
  2168.         This  procedure will utilize  ANSI graphics screen controls to
  2169.         move the cursor <move> spaces upward on the screen.
  2170.  
  2171.         ** Remember that if the variable <toggle.disable_screen> is set
  2172.         to TRUE, no output  will be displayed on the local console! **
  2173.  
  2174.     Example
  2175.  
  2176.         begin
  2177.           ansi_up( 12 );
  2178.         end;
  2179.  
  2180.     Variables
  2181.  
  2182.         stats.ansi
  2183.         toggle.disable_screen
  2184.  
  2185.     See Also
  2186.  
  2187.         ansi_left, ansi_right, ansi_gotoxy, ansi_down, ansi_erase_line,
  2188.         ansi_clrscr, ansi_color
  2189.  
  2190.  
  2191. Triumph Software - TriDoor Documentation                                pg. 046
  2192.  
  2193.                                                                       ansi_down
  2194.  
  2195.     Synopsis
  2196.  
  2197.         procedure ansi_down( move : integer );
  2198.  
  2199.     Description
  2200.  
  2201.         This procedure utilizes  ANSI graphics screen controls to move
  2202.         the cursor <move> spaces down on the local and remote screens.
  2203.  
  2204.         ** Remember that if the variable <toggle.disable_screen> is set
  2205.         to TRUE, no output  will be displayed on the local console! **
  2206.  
  2207.     Example
  2208.  
  2209.         begin
  2210.           ansi_down( 5 );
  2211.         end;
  2212.  
  2213.     Variables
  2214.  
  2215.         stats.ansi
  2216.         toggle.disable_screen
  2217.  
  2218.     See Also
  2219.  
  2220.         ansi_left, ansi_right, ansi_gotoxy, ansi_up, ansi_erase_line,
  2221.         ansi_clrscr, ansi_color
  2222.  
  2223.  
  2224. Triumph Software - TriDoor Documentation                                pg. 047
  2225.  
  2226.                                                                      ansi_color
  2227.  
  2228.     Synopsis
  2229.  
  2230.         procedure ansi_color( blink,
  2231.                               intensity,
  2232.                               foreground,
  2233.                               background : integer );
  2234.  
  2235.     Description
  2236.  
  2237.         This  procedure will utilize  ANSI graphics screen controls to
  2238.         change the current color on both the local and remote screens.
  2239.         A group of constants has been made available to the programmer
  2240.         to fill in the necessary variables when calling this function.
  2241.         These constants are as follows :
  2242.  
  2243.              <blink>         BLINK_ON, BLINK_OFF
  2244.              <intensity>     INTENSITY_ON, INTENSITY_OFF
  2245.  
  2246.              <foreground> /
  2247.              <background>    BLACK, RED, GREEN, YELLOW, BLUE,
  2248.                            MAGENTA, CYAN, WHITE
  2249.  
  2250.         ** Remember that if the variable <toggle.disable_screen> is set
  2251.         to TRUE, no output  will be displayed on the local console! **
  2252.  
  2253.     Example
  2254.  
  2255.         begin
  2256.           ansi_color( BLINK_OFF, INTENSITY_ON, YELLOW, BLACK );
  2257.           td_writeln( 'This is solid bright yellow on black.||||' );
  2258.           ansi_color( BLINK_ON, INTENSITY_ON, RED, BLACK );
  2259.           td_writeln( 'This is blinking bright red on black.||||' );
  2260.           ansi_color( BLINK_OFF, INTENSITY_OFF, BLUE, GREEN );
  2261.           td_writeln( 'This is solid dark blue on green.||||' );
  2262.         end;
  2263.  
  2264.     Variables
  2265.  
  2266.         stats.ansi
  2267.         toggle.disable_screen
  2268.         BLINK_ON, BLINK_OFF, INTENSITY_ON, INTENSITY_OFF (constants)
  2269.         BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, 
  2270.         CYAN, WHITE (constants)
  2271.  
  2272.     See Also
  2273.  
  2274.         ansi_left, ansi_right, ansi_gotoxy, ansi_up, ansi_down,
  2275.         ansi_erase_line, ansi_clrscr
  2276.  
  2277.  
  2278. Triumph Software - TriDoor Documentation                                pg. 048
  2279.  
  2280.                                                                    read_dorinfo
  2281.  
  2282.     Synopsis
  2283.  
  2284.         function read_dorinfo : Boolean;
  2285.  
  2286.     Description
  2287.  
  2288.         This function is one of the automatic functions, included with
  2289.         TriDoor, that  reads in  a  on-line door support file, in this
  2290.         case DORINFO1.DEF, and fills in  the  <stats>  record with the
  2291.         needed information for door operation.  If the file exists and
  2292.         it successfully read in and converted, the program will return
  2293.         a Boolean TRUE.  If the  file  is  missing, the  function will
  2294.         return a FALSE.
  2295.  
  2296.         If your  program fills in the <support_path> variable with the
  2297.         path to  the  on-line door  support  file,  this function will
  2298.         automatically  search for  it in that directory.  Otherwise it
  2299.         will search the current directory.
  2300.  
  2301.         To see a copy of these procedures and an explanation on how to
  2302.         create your own functions for different door support files see
  2303.         the sections  entitled  PROGRAMMING WITH TRIDOOR  and CREATING
  2304.         YOUR OWN DOOR SUPPORT.
  2305.  
  2306.     Example
  2307.  
  2308.         begin
  2309.           if ( read_dorinfo ) then
  2310.             begin
  2311.  
  2312.               if ( setup_tridoor ) then
  2313.                 begin
  2314.  
  2315.                      {* main program here *}
  2316.  
  2317.                 end
  2318.               else writeln( 'TriDoor failed to setup communications port!' );
  2319.  
  2320.             end
  2321.           else writeln( 'TriDoor could not find DORINFO1.DEF!' );
  2322.         end;
  2323.  
  2324.     Variables
  2325.  
  2326.         stats (record )
  2327.  
  2328.     See Also
  2329.  
  2330.         read_pcboard
  2331.  
  2332.  
  2333. Triumph Software - TriDoor Documentation                                pg. 049
  2334.  
  2335.                                                                    read_pcboard
  2336.  
  2337.     Synopsis
  2338.  
  2339.         function read_pcboard : Boolean;
  2340.  
  2341.     Description
  2342.  
  2343.         This function is one of the automatic functions, included with
  2344.         TriDoor, that  reads  in a  on-line door support file, in this
  2345.         case PCBOARD.SYS, and fills in the  <stats>  record  with  the
  2346.         needed information for door operation.  If the file exists and
  2347.         it successfully read in and converted, the program will return
  2348.         a Boolean TRUE.  If the  file  is missing, the  function  will
  2349.         return a FALSE.
  2350.  
  2351.         If  your program fills in the <support_path> variable with the
  2352.         path to the on-line  door  support  file,  this  function will
  2353.         automatically  search  for it in that directory.  Otherwise it
  2354.         will search the current directory.
  2355.  
  2356.     Example
  2357.  
  2358.         begin
  2359.           if ( read_dorinfo ) then
  2360.             begin
  2361.  
  2362.               if ( setup_tridoor ) then
  2363.                 begin
  2364.     
  2365.                   {* main program here *}
  2366.  
  2367.                 end
  2368.               else writeln( 'TriDoor failed to setup communications port!' );
  2369.  
  2370.             end
  2371.           else writeln( 'TriDoor could not find DORINFO1.DEF!' );
  2372.         end;
  2373.  
  2374.     Variables
  2375.  
  2376.         stats (record )
  2377.  
  2378.     See Also
  2379.  
  2380.         read_dorinfo
  2381.  
  2382.  
  2383. Triumph Software - TriDoor Documentation                                pg. 050
  2384.  
  2385.                                                                    display_file
  2386.  
  2387.     Synopsis
  2388.  
  2389.         procedure display_file( file_name : string; line_pause : word );
  2390.  
  2391.     Description
  2392.  
  2393.         This procedure will display the file file_name and pause every
  2394.         line_pause  lines will  prompt the  user for a keypress before
  2395.         continuing.  This  procedure  displays  text on both the local
  2396.         and remote screens.
  2397.  
  2398.         This procedure now acknowledges ANSI screen controls.
  2399.  
  2400.         ** Remember that if the variable <toggle.disable_screen> is set
  2401.         to TRUE, no output  will be displayed on the local console! **
  2402.  
  2403.     Example
  2404.  
  2405.         begin
  2406.           display_file( 'WELCOME.TXT', 23 );
  2407.         end;
  2408.  
  2409.     Variables
  2410.  
  2411.         toggle.disable_screen
  2412.  
  2413.     See Also
  2414.  
  2415.         none
  2416.  
  2417.  
  2418. Triumph Software - TriDoor Documentation                                pg. 051
  2419.  
  2420.  
  2421.                       7.0  ADVANCED COMMAND SUMMARY
  2422.  
  2423.  
  2424.      The  following is  a  group  of  commands that  are made available, by
  2425.    TriDoor, to the programmer.
  2426.  
  2427.      These functions and  procedures are automatically executed and handled
  2428.    by TriDoor  and would only be  needed by the programmer if he or she was
  2429.    intending to  write an alternate or  substitute function or procedure to
  2430.    one of TriDoor's.
  2431.  
  2432.  
  2433. Triumph Software - TriDoor Documentation                                pg. 052
  2434.  
  2435.                                                               record_logon_time
  2436.  
  2437.     Synopsis
  2438.  
  2439.         procedure record_logon_time;
  2440.  
  2441.     Description
  2442.  
  2443.         This function will  take the  current time  and record that as
  2444.         the user's log-on  time and store  it  in  the global variable
  2445.         <logon_time>.
  2446.  
  2447.         This  function  is  automatically  executed  by TriDoor in the
  2448.         setup_tridoor() function.
  2449.  
  2450.     Example
  2451.  
  2452.         begin
  2453.           record_logon_time;
  2454.         end;
  2455.  
  2456.     Variables
  2457.  
  2458.         logon_time
  2459.  
  2460.     See Also
  2461.  
  2462.         time_remaining, display_time, time_until_timeout
  2463.         statusbar_refresh, reset_activity_timer, reset_statusbar_timer
  2464.  
  2465.  
  2466. Triumph Software - TriDoor Documentation                                pg. 053
  2467.  
  2468.                                                                  time_remaining
  2469.  
  2470.     Synopsis
  2471.  
  2472.         function time_remaining : integer;
  2473.  
  2474.     Description
  2475.  
  2476.         This function  will  return the number of minutes the user has
  2477.         remaining  in  their  on-line session.  In  addition  to  it's
  2478.         primary function, this  function also  monitors  all secondary
  2479.         time-related functions and handles them as is necessary.
  2480.  
  2481.         This  function  monitors  user  inactivity,  and  if  the user
  2482.         exceeds     their      inactivity     time      limit,     and
  2483.         <toggle.inactivity_timeout>     is     set    to   TRUE,   the
  2484.         time_remaining()  function  will  set <toggle.halt_program> to
  2485.         TRUE     and     display     the     message     stored     in
  2486.         <toggle.inactivty_timeout>.
  2487.  
  2488.         This function will  also monitor  the user's remaining on-line
  2489.         time.   If    the    user's    time    has    run    out   and
  2490.         <toggle.automatic_dropout>  has   been  set    to   TRUE,  the
  2491.         time_remaining()  function will  set <toggle.halt_program>  to
  2492.         TRUE and display the message stored in <message.out_of_time>.
  2493.  
  2494.     Example
  2495.  
  2496.         var
  2497.           time_rem : integer;
  2498.     
  2499.         begin
  2500.           time_rem := time_remaining;
  2501.           td_writeln( 'You have'+strg(time_rem)+' minutes left online.||' );
  2502.         end;
  2503.  
  2504.     Variables
  2505.  
  2506.         logon_time, inactivity_time
  2507.         message.out_of_time, message.inactivity_timeout
  2508.         stats.time
  2509.         toggle.halt_program, toggle.automatic_dropout,
  2510.         toggle.inactivity_timeout
  2511.  
  2512.     See Also
  2513.  
  2514.         record_login_time, display_time, time_until_timeout
  2515.         statusbar_refresh, reset_activity_timer, reset_statusbar_timer
  2516.  
  2517.  
  2518. Triumph Software - TriDoor Documentation                                pg. 054
  2519.  
  2520.                                                                    display_time
  2521.  
  2522.     Synopsis
  2523.  
  2524.         procedure display_time;
  2525.  
  2526.     Description
  2527.  
  2528.         This  procedure  will  display  the  time the user on-line has
  2529.         remaining in their session.  It displays it in the upper-right
  2530.         hand corner of the status bar.
  2531.  
  2532.         This  function  can  be  deactivated  by  setting  the  global
  2533.         variable <toggle.disable_time_display> to TRUE.
  2534.  
  2535.         This function is automatically executed by TriDoor.
  2536.  
  2537.     Example
  2538.  
  2539.         begin
  2540.           display_time;
  2541.         end;
  2542.  
  2543.     Variables
  2544.  
  2545.         logon_time, inactivity_time
  2546.         message.out_of_time, message.inactivity_timeout
  2547.         stats.time
  2548.         toggle.halt_program, toggle.automatic_dropout,
  2549.         toggle.inactivity_timeout, toggle.disable_time_display,
  2550.         toggle.disable_screen
  2551.  
  2552.     See Also
  2553.  
  2554.         record_login_time, time_remaining, time_until_timeout
  2555.         statusbar_refresh, reset_activity_timer, reset_statusbar_timer
  2556.  
  2557.  
  2558. Triumph Software - TriDoor Documentation                                pg. 055
  2559.  
  2560.                                                              time_until_timeout
  2561.  
  2562.     Synopsis
  2563.  
  2564.         function time_until_timeout : longint;
  2565.  
  2566.     Description
  2567.  
  2568.         This  function  determines  and  returns the number of seconds
  2569.         until the user has exceeded their inactivity time-out limit.
  2570.  
  2571.         If  you  ever  decide  to  write  your   own  replacements  or
  2572.         alternates for internal TriDoor functions, such as td_readln()
  2573.         which give the  user an opportunity to sit for long periods of
  2574.         time  without pressing  any keys, it  is  good  to  check this
  2575.         frequently.
  2576.  
  2577.         The   easiest way  to  do  this  is  to  simply  call  on  the
  2578.         time_remaining() function at  the end of every wait cycle that
  2579.         the user does not press a key.  This function handles all time
  2580.         related   functions   including  inactivity   and   user  time
  2581.         depletion.
  2582.  
  2583.         The number of seconds of inactivity the user is allowed before
  2584.         time-out is stored in the global variable <inactivity_timeout>.
  2585.         The  last occurrence of a user keypress is stored, in seconds,
  2586.         in the global variable <activity_log> as the number of seconds
  2587.         from the preceding midnight.
  2588.  
  2589.         This  function  is  automatically  monitored  and  executed by
  2590.         TriDoor.
  2591.  
  2592.     Example
  2593.  
  2594.         var
  2595.           task_complete : Boolean;
  2596.  
  2597.         begin
  2598.           task_complete := FALSE;   (* assume task is not completed *)
  2599.           while ( time_until_timeout > 0 ) and ( not task_complete ) do
  2600.             begin
  2601.                (* Task that requires user input here.*)
  2602.                (* Assigns task_complete := TRUE if user has completed task *)
  2603.             end;
  2604.           if ( time_until_timeout > 0 ) then
  2605.             td_writeln( 'User is out of time.' );
  2606.         end;
  2607.  
  2608.     Variables
  2609.  
  2610.         inactivty_time, activity_log
  2611.         
  2612.     See Also
  2613.  
  2614.         display_time, record_login_time, time_remaining
  2615.         statusbar_refresh, reset_activity_timer, reset_statusbar_timer
  2616.  
  2617.  
  2618. Triumph Software - TriDoor Documentation                                pg. 056
  2619.  
  2620.                                                               statusbar_refresh
  2621.  
  2622.     Synopsis
  2623.  
  2624.         function statusbar_refresh : Boolean;
  2625.  
  2626.     Description
  2627.  
  2628.         This  function  is  very  similar to  the time_until_timeout()
  2629.         function  with two  exceptions.  Firstly,  its  purpose  is to
  2630.         monitor the  time since  the status bar had last been changed,
  2631.         and secondly, it  only returns a TRUE if it is time to refresh
  2632.         the status bar or a FALSE if it is not.
  2633.  
  2634.         It is  also important to note that after the point at which it
  2635.         returns a  true, it  automatically resets  the  counter, so it
  2636.         will return a TRUE every  nn seconds.  This  interval value is
  2637.         stored in the global variable <statusbar_refresh_time>.
  2638.  
  2639.         This  function is  automatically  monitored  and  executed  by
  2640.         TriDoor.
  2641.  
  2642.     Example
  2643.  
  2644.         begin
  2645.           if ( statusbar_refresh ) then
  2646.             display_statusbar;
  2647.         end;
  2648.  
  2649.     Variables
  2650.  
  2651.         statusbar_log, statusbar_refresh_time
  2652.         
  2653.     See Also
  2654.  
  2655.         record_logon_time, time_remaining, display_time, time_until_timeout
  2656.         reset_activity_timer, reset_statusbar_timer
  2657.  
  2658.  
  2659. Triumph Software - TriDoor Documentation                                pg. 057
  2660.  
  2661.                                                            reset_activity_timer
  2662.  
  2663.     Synopsis
  2664.  
  2665.         procedure reset_activity_timer;
  2666.  
  2667.     Description
  2668.  
  2669.         This  procedure simply  resets  the  user  keyboard inactivity
  2670.         timer.  This function  is automatically  called by TriDoor ANY
  2671.         time a remote user presses a key. TriDoor does NOT monitor the
  2672.         local keyboard, but all higher-level TriDoor functions do.
  2673.  
  2674.         In other words, if you  write your  own function that monitors
  2675.         Turbo Pascal's keypressed function and then executes a readkey
  2676.         the inactivity  timer will  not be  reset , unless you execute
  2677.         reset_activity_timer().  (It  is possible that you may want to
  2678.         have it set up this way, depending on the circumstances.)
  2679.  
  2680.         The number of seconds of inactivity the user is allowed before
  2681.         time-out is stored in the global variable <inactivity_timeout>.
  2682.         The last  occurrence of a user keypress is stored, in seconds,
  2683.         in the global <variable activity_log> as the number of seconds
  2684.         from the preceding midnight.
  2685.  
  2686.         This function is automatically executed by TriDoor.
  2687.  
  2688.     Example
  2689.  
  2690.         begin
  2691.           if ( buffer_head <> buffer_tail ) then  
  2692.             {* if ring buffer has an entry waiting*}
  2693.             reset_activity_timer;
  2694.         end;
  2695.  
  2696.     Variables
  2697.  
  2698.         inactivty_time, activity_log
  2699.  
  2700.     See Also
  2701.  
  2702.         record_logon_time, time_remaining, display_time, time_until_timeout
  2703.         statusbar_refresh, reset_statusbar_timer
  2704.  
  2705.  
  2706. Triumph Software - TriDoor Documentation                                pg. 058
  2707.  
  2708.                                                           reset_statusbar_timer
  2709.  
  2710.     Synopsis
  2711.  
  2712.         procedure reset_statusbar_timer;
  2713.  
  2714.     Description
  2715.  
  2716.         This  procedure  is  the  duplicate  of reset_activity_timer()
  2717.         except that it handles the status  bar timer  and not the user
  2718.         inactivity timer.
  2719.  
  2720.         The  last occurrence  of a  status  bar  reset  is  stored, in
  2721.         seconds, in the global variable statusbar_log as the number of
  2722.         seconds from the preceding midnight.
  2723.  
  2724.         This procedure is automatically executed by TriDoor.
  2725.  
  2726.     Example
  2727.  
  2728.         begin
  2729.           reset_statusbar_timer
  2730.         end;
  2731.  
  2732.     Variables
  2733.  
  2734.         statusbar_log
  2735.  
  2736.     See Also
  2737.  
  2738.         record_logon_time, time_remaining, display_time, time_until_timeout
  2739.         statusbar_refresh, reset_activity_timer
  2740.  
  2741.  
  2742. Triumph Software - TriDoor Documentation                                pg. 059
  2743.  
  2744.                                                               display_statusbar
  2745.  
  2746.     Synopsis
  2747.  
  2748.         procedure display_statusbar;
  2749.  
  2750.     Description
  2751.  
  2752.         This  procedure  will  display  the  normal  status bar at the
  2753.         bottom of  the local screen.  This status bar will display the
  2754.         name of your  program, stored in door_name as well as the name
  2755.         of    the   user    on-line    (<stats.name>),    baud    rate
  2756.         (<stats.real_baud>)    of    connection    and   the    user's
  2757.         time_remaining() in the door.
  2758.  
  2759.         This procedure  is  maintained by  TriDoor  and will always be
  2760.         restored after  a number  of  seconds set by the programmer in
  2761.         the variable <statusbar_refresh_time>.  It can also be brought
  2762.         up by a local keypress of [F3].
  2763.  
  2764.         ** Remember that if the variable <toggle.disable_screen> is set
  2765.         to TRUE, no output will be displayed on the local console! **
  2766.  
  2767.     Example
  2768.  
  2769.         begin
  2770.           display_statusbar;
  2771.         end;
  2772.  
  2773.     Variables
  2774.  
  2775.         statusbar_refresh_time,
  2776.         toggle.disable_screen, toggle.disable_time_display
  2777.  
  2778.     See Also
  2779.  
  2780.         display_helpbar_1, display_helpbar_2
  2781.         statusbar_message
  2782.  
  2783.  
  2784. Triumph Software - TriDoor Documentation                                pg. 060
  2785.  
  2786.                                                               display_helpbar_1
  2787.  
  2788.     Synopsis
  2789.  
  2790.         procedure display_helpbar_1;
  2791.  
  2792.     Description
  2793.  
  2794.         This procedure will display the first of two help  bars at the
  2795.         bottom  of the screen  with a list of some of the command-keys
  2796.         available to the local SysOp.  This procedure is automatically
  2797.         monitored  by TriDoor and activated  by  a local  keypress  of
  2798.         [F1].
  2799.  
  2800.         ** Remember that if the variable <toggle.disable_screen> is set
  2801.         to TRUE, no  output will be displayed on the local console! **
  2802.  
  2803.     Example
  2804.  
  2805.         begin
  2806.           display_helpbar_1;
  2807.         end;
  2808.  
  2809.     Variables
  2810.  
  2811.         toggle.disable_screen
  2812.  
  2813.     See Also
  2814.  
  2815.         display_helpbar_2, display_statusbar
  2816.         statusbar_message
  2817.  
  2818.  
  2819. Triumph Software - TriDoor Documentation                                pg. 061
  2820.  
  2821.                                                               display_helpbar_2
  2822.  
  2823.     Synopsis
  2824.  
  2825.         procedure display_helpbar_2;
  2826.  
  2827.     Description
  2828.  
  2829.         This procedure will display the second of two help bars at the
  2830.         bottom of the  screen with a  list of some of the command-keys
  2831.         available to the local SysOp.  This procedure is automatically
  2832.         monitored  by TriDoor and activated  by  a  local  keypress of
  2833.         [F2].
  2834.  
  2835.         ** Remember that if the variable toggle.disable_screen is set
  2836.         to TRUE, no  output will be displayed on the local console! **
  2837.  
  2838.     Example
  2839.  
  2840.         begin
  2841.           display_helpbar_2;
  2842.         end;
  2843.  
  2844.     Variables
  2845.     
  2846.         toggle.disable_screen
  2847.  
  2848.     See Also
  2849.  
  2850.         display_helpbar_1, display_statusbar
  2851.         statusbar_message
  2852.  
  2853.  
  2854. Triumph Software - TriDoor Documentation                                pg. 062
  2855.  
  2856.                                                               display_helpbar_2
  2857.  
  2858.     Example
  2859.  
  2860.         begin
  2861.           if ( read_dorinfo ) then
  2862.             begin
  2863.  
  2864.               if ( setup_tridoor ) then
  2865.                 begin
  2866.  
  2867.                      {* main program here *}
  2868.  
  2869.                 end
  2870.               else writeln( 'TriDoor failed to setup communications port!' );
  2871.     
  2872.             end
  2873.           else writeln( 'TriDoor could not find DORINFO1.DEF!' );
  2874.         end;
  2875.  
  2876.     Variables
  2877.     
  2878.         toggle.disable_screen
  2879.  
  2880.     See Also
  2881.  
  2882.         display_helpbar_2, display_statusbar
  2883.         statusbar_message
  2884.  
  2885.  
  2886. Triumph Software - TriDoor Documentation                                pg. 063
  2887.  
  2888.                                                               special_key_check
  2889.  
  2890.     Synopsis
  2891.  
  2892.         procedure special_key_check;
  2893.  
  2894.     Description
  2895.  
  2896.         This  procedure  is  executed  when  a  local  function key or
  2897.         special key  is pressed.  These keys ([F1],  [ALT-F4], [PgDn],
  2898.         etc.) actually generate TWO keystrokes, the first one having a
  2899.         value of zero.  If you  create  a  procedure  or function as a
  2900.         substitute  or alternate to one  of the TriDoor functions that
  2901.         require a fair amount of time or waits for keystrokes from the
  2902.         local or remote user, you  must  do  the following in order to
  2903.         make  sure  that  these  special  local  keystrokes  are still
  2904.         acknowledged :
  2905.  
  2906.         1> If a key is pressed, check to see if it is a NULL
  2907.            character. (chr(0), ord value  of 0)
  2908.  
  2909.         2> If the key that was pressed was, in fact, a null character,
  2910.            call the special_key_check() procedure.  This will automatically
  2911.            handle the keypress and then return to the calling procedure.
  2912.  
  2913.         3> If it is not a null character, treat it as a normal one.
  2914.  
  2915.     Example
  2916.  
  2917.         var
  2918.           done   : Boolean;
  2919.           kb_hit : character; {* keyboard character *}
  2920.  
  2921.         begin      {* do_some_task *}
  2922.  
  2923.           while ( not done ) and ( not exit_door ) do
  2924.             begin
  2925.  
  2926.                  { *** procedure body here *** }
  2927.     
  2928.               if keypressed then
  2929.                 begin
  2930.                   kb_hit := readkey;
  2931.                   if ( kb_hit = chr(0) ) then
  2932.                     special_key_check
  2933.                end
  2934.              else
  2935.  
  2936.                 { ** handle keypress as normal **}
  2937.  
  2938.            end;
  2939.          end;
  2940.        end;  { do_some_task }
  2941.  
  2942.  
  2943.  
  2944. Triumph Software - TriDoor Documentation                                pg. 064
  2945.  
  2946.  
  2947.         If you do not do this special functions, like status bar help
  2948.         menus, chat mode, and DOS shell will not function within your
  2949.         procedure.
  2950.  
  2951.     Variables
  2952.  
  2953.         none
  2954.  
  2955.     See Also
  2956.  
  2957.         none
  2958.  
  2959.  
  2960. Triumph Software - TriDoor Documentation                                pg. 065
  2961.  
  2962.                                                                       chat_mode
  2963.  
  2964.     Synopsis
  2965.  
  2966.         procedure chat_mode;
  2967.  
  2968.     Description
  2969.  
  2970.         This is a a built-in, full-feature, multi-color (if the user's
  2971.         ANSI is enabled by having set the global variable <stats.ansi>
  2972.         to TRUE), word-wrapping, chat mode.
  2973.  
  2974.         Every door you write incorporating TriDoor  will automatically
  2975.         have this nice  chat mode built  right in to it, thus allowing
  2976.         the SysOp to  communicate  with  the  on-line  user easily and
  2977.         efficiently.
  2978.  
  2979.         This  procedure  is  automatically  handled by TriDoor and  is
  2980.         activated by pressing [F10] on the local keyboard.
  2981.  
  2982.         ** Remember that if the variable <toggle.disable_screen> is set
  2983.         to TRUE, this  function will not execute! **
  2984.  
  2985.     Example
  2986.  
  2987.         begin
  2988.          chat_mode;
  2989.         end;
  2990.  
  2991.     Variables
  2992.  
  2993.         stats.ansi
  2994.         toggle.disable_screen, toggle.disable_user_keyboard
  2995.  
  2996.     See Also
  2997.  
  2998.         none
  2999.  
  3000.  
  3001. Triumph Software - TriDoor Documentation                                pg. 066
  3002.  
  3003.                                                                       user_page
  3004.  
  3005.     Synopsis
  3006.  
  3007.         procedure user_page;
  3008.  
  3009.     Description
  3010.  
  3011.         This procedure will  allow the SysOp to page the on-line user.
  3012.         Yes, you  read correctly.  Oftentimes the user  will walk away
  3013.         from the  computer  for one  reason or another and if you feel
  3014.         the need to  get his or  her  attention,  this  procedure will
  3015.         alert the user to that fact.
  3016.  
  3017.         When called, user_page() will display  the messages  stored in
  3018.         <message.user_being_paged_1> and <message.user_being_paged_2>,
  3019.         and then  beeps until  the user  answers the page or the SysOp
  3020.         aborts it.
  3021.  
  3022.         It is not  advisable to  call this  procedure  from within the
  3023.         program  since it  will then  bring  the user  into chat, from
  3024.         which only the SysOp can release them.
  3025.  
  3026.         ** Remember that if the variable toggle.disable_screen is set
  3027.         to TRUE, this  function will not execute! **
  3028.  
  3029.     Example
  3030.  
  3031.         begin
  3032.           user_page;  {* remember, this is not advisable *}
  3033.         end;
  3034.  
  3035.     Variables
  3036.  
  3037.         toggle.disable_screen, 
  3038.         See Also
  3039.  
  3040.  
  3041. Triumph Software - TriDoor Documentation                                pg. 067
  3042.  
  3043.                                                           artificial_line_noise
  3044.  
  3045.     Synopsis
  3046.  
  3047.         procedure artificial_line_noise;
  3048.  
  3049.     Description
  3050.  
  3051.         This procedure  will  generate a  brief spurt  of feigned line
  3052.         noise.  While  this  is  a  bit  silly,  it  is  unfortunately
  3053.         sometimes a nice  thing to have when you need to get rid of an
  3054.         annoying user without making yourself look bad.
  3055.  
  3056.         The artificial_line_noise() procedure is automatically handled
  3057.         by TriDoor and  is activated  by  pressing  [ALT]-[F4]  on the
  3058.         local keyboard.
  3059.  
  3060.         ** Remember that if the variable toggle.disable_screen is set
  3061.         to TRUE, no  output will be displayed on the local console! **
  3062.  
  3063.     Example
  3064.  
  3065.         begin
  3066.           artificial_line_noise;
  3067.         end;
  3068.  
  3069.     Variables
  3070.  
  3071.         toggle.disable_screen
  3072.     
  3073.     See Also
  3074.  
  3075.         none
  3076.  
  3077.  
  3078. Triumph Software - TriDoor Documentation                                pg. 068
  3079.  
  3080.                                                                       dos_shell
  3081.  
  3082.     Synopsis
  3083.  
  3084.         procedure dos_shell;
  3085.  
  3086.     Description
  3087.  
  3088.         This  procedure will  drop the  SysOp to DOS while leaving the
  3089.         user on-line.  This  is an  extremely useful  function for any
  3090.         SysOp, but  will require  the programmer  to  do  some  clever
  3091.         memory management.
  3092.  
  3093.         You must  use the $M  compiler directive  at  the beginning of
  3094.         each of  your door  programs to allow space in memory for both
  3095.         your  door  and  the  DOS  shell  to  function.   For  further
  3096.         information on  the $M compiler directive, see the EXAMPLE.PAS
  3097.         program  included with TriDoor,  and most importantly, consult
  3098.         your Turbo Pascal manual.
  3099.  
  3100.         TriDoor will automatically determine which shell you are using
  3101.         (COMMAND.COM,  4DOS.COM,  etc.)  and run that whenever [F5] is
  3102.         pressed on the local keyboard.
  3103.  
  3104.         The dos_shell function is automatically handled by TriDoor and
  3105.         is activated by pressing [F5] on the local keyboard.
  3106.  
  3107.         ** Remember that if the variable toggle.disable_screen is set
  3108.         to TRUE, this  function will not execute! **
  3109.  
  3110.     Example
  3111.  
  3112.         begin
  3113.           dos_shell;
  3114.         end;
  3115.  
  3116.     Variables
  3117.  
  3118.         toggle.disable_screen
  3119.  
  3120.     See Also
  3121.  
  3122.         none
  3123.  
  3124.  
  3125. Triumph Software - TriDoor Documentation                                pg. 069
  3126.  
  3127.  
  3128.  
  3129.               8.0  ACCESSIBLE GLOBAL VARIABLES AND CONSTANTS
  3130.  
  3131.                      8.1  Accessible Global Variables
  3132.  
  3133.  
  3134.     stats_record =   { ** This is the actual {stats} record type ** }
  3135.       record
  3136.         name           : string[50]; { name of user currently on-line       }  
  3137.         real_baud,                   { actual baud rate (as seen by user)   } 
  3138.         lock_baud      : longint;    { locked baud rate (comp. to modm)     } 
  3139.         time           : integer;    { time user has left in door today     }
  3140.         comstr         : string[20]; { comstring - format 1200,N,8,1'       } 
  3141.         comport        : integer;    { communications port- COM1,COM2, etc  }
  3142.         comp_interrupt,              { communications port interrupt (IRQ)  } 
  3143.         comp_dbits,                  { data bits (7,8)                      }
  3144.         comp_sbits,                  { stop bits (normally 1)               }
  3145.         comp_parity  : integer;      { parity (ODD,EVEN,NONE)               }
  3146.         ansi         : Boolean;      { ANSI commands enabled if TRUE        }
  3147.       end;
  3148.  
  3149.  
  3150. Triumph Software - TriDoor Documentation                                pg. 070
  3151.  
  3152.  
  3153.  
  3154.      The following  is a  record of messages that are displayed on both the
  3155.    local and remote screens at certain times during program operation.  All
  3156.    of these messages have default settings, but can be changed at any time.
  3157.  
  3158.      message_record =  { ** This is the actual {message} record type ** }
  3159.        record               { Message displayed when...  } 
  3160.      *  enter_chat_mode,            { entering chat mode                }
  3161.      *  exit_chat_mode,             { exiting chat mode                 }
  3162.      *  user_being_paged_1,         { user being paged (1 of 2)         }
  3163.      *  user_being_paged_2,         { user being paged (2 of 2)         }
  3164.      *  sysop_aborted_page,         { SysOp aborts user pager           }
  3165.      *  user_answered_page,         { user answers user page            }
  3166.      *  inactivity_timeout,         { user is inactive and dropped out  }
  3167.      *  out_of_time,                { user runs out of time for session }
  3168.      *  forced_dropout : string;    { user is forced out by SysOp       }
  3169.       end;
  3170.  
  3171.  
  3172.      The following  is a record of  Boolean (TRUE/FALSE) toggles which help
  3173.    you  to  control  TriDoor  in some case, and  help TriDoor keep track of
  3174.    itself in others.
  3175.  
  3176.      toggle_record =  { ** This is the actual {toggle} record type ** } 
  3177.        record                   { When set to TRUE... }                  {def}
  3178.      *   td_writeln_echo,       { td_writeln will echo to local screen } { T }
  3179.          user_local,            { on-line user is local }
  3180.      *#  disable_screen,        { TriDoor will not write to local scrn } { F }
  3181.      *   clear_disabled_screen, { clears local screen when disabled }    { T }
  3182.      *#  disable_queue,         { disables the print queue }             { F }
  3183.      *#  disable_time_display,  { will not show time in statusbar }      { F }
  3184.      *#  disable_user_keyboard, { remote user keyboard strokes ignored } { F }
  3185.      *   inactivity_timeout,    { drops out if inactivity limit reached }{ T }
  3186.      *   automatic_dropout,     { drops out if halting condition is met }{ T }
  3187.          XOFF,                  { XON/XOFF flow control status register }  
  3188.      *#  halt_program,          { top priority halting condition }       { F }
  3189.      *#  in_chat_mode : Boolean;{ whether or not in chat mode }          { F }
  3190.        end;
  3191.  
  3192.      Most of  these  toggles  are  all pre-assigned by TriDoor, and some of
  3193.    them (like toggle.disable_time_display and toggle.disable_user_keyboard)
  3194.    are changed by  TriDoor from time to time within the normal operation of
  3195.    your door.  The def column are  representations of the default values of
  3196.    these toggles when a program using TriDoor is started; T=TRUE, F=FALSE.
  3197.  
  3198.  
  3199.  
  3200. Triumph Software - TriDoor Documentation                                pg. 071
  3201.  
  3202.  
  3203.      The  rest of  the  global  variables are  just standard variables, not
  3204.    record variables, that may be accessed at any time by the programmer.
  3205.  
  3206.      var
  3207.        stats    : stats_record;     { main stat_record r ecord    }
  3208.     *  message  : message_record;   { main message_record record  } 
  3209.     *  toggle   : toggle_record;    { main toggle_record record   }
  3210.  
  3211.     *# direct_xypos : word;         { screen memory position aft.       } 
  3212.                                     { direct_gotoxy has been called.    }
  3213.  
  3214.     *# logon_time   : word;         { logon time of user (in minutes)   } 
  3215.     *# screen_mode  : word;         { screen memory position            }
  3216.  
  3217.     *# statusbar_refresh_time,      { time until status bar is re-drawn }
  3218.     *# inactivity_time : integer;   { time until user is timed out      }
  3219.                                     {   ^both of these are in seconds^  }
  3220.  
  3221.     *# statusbar_log,               { record of time statusbar was changed }
  3222.     *# activity_log   : longint;    { keeps record of last user keypresses }
  3223.                                     {    ^both of these are in seconds^    }
  3224.  
  3225.        support_path,                { path to door support files           }
  3226.     *# queue_cache    : string;     { queue string for td_writeln procedure}
  3227.  
  3228.        door_name  : string[80];     { name of program running              }
  3229.  
  3230.  
  3231.  
  3232. Triumph Software - TriDoor Documentation                                pg. 072
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.                      8.2  Accessible Global Constants
  3239.  
  3240.  
  3241.      The  following  is  a  list  of  global  constants   available to  the
  3242.    programmer  in order to make some tasks a little easier.  They cannot be
  3243.    re-assigned  like  accessible  global  variables  can;  they  have  been
  3244.    pre-assigned to actual addresses and values.
  3245.  
  3246.         * EVEN, ODD, MARK, SPACE, NONE  (parity settings)
  3247.  
  3248.         * COM1, COM2, COM3, COM4  (comport settings)
  3249.  
  3250.         * IRQ2, IRQ3, IRQ4 IRQ  (settings)
  3251.  
  3252.         * BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE
  3253.           (ANSI graphics color settings)
  3254.  
  3255.         * INTENSITY_ON, INTENSITY_OFF, BLINK_ON, BLINK_OFF
  3256.           (additional ANSI graphics settings)
  3257.  
  3258.         * TDVER, TDDATE  (active TriDoor version and date)
  3259.  
  3260.         * CR, BS  (carriage return and destructive backspace)
  3261.  
  3262.         * YES, NO  (used for confirm function)
  3263.  
  3264.         * CAPS_ON, CAPS_OFF, CODE_ON, CODE_OFF
  3265.           (used for td_readln procedure)
  3266.  
  3267.         * ECHO_ON, ECHO_OFF  (used for td_outstrg, td_outchar)
  3268.  
  3269.  
  3270.      All of these constants can be used in normal programming.  For example:
  3271.  
  3272.           td_writeln('This program is using V'+TDVER+' of TriDoor');
  3273.           stats.comport := COM1;
  3274.           stats.comp_interrupt := IRQ4;
  3275.  
  3276.  
  3277.  
  3278. Triumph Software - TriDoor Documentation                                pg. 073
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.                            9.0  RESERVED WORDS
  3285.  
  3286.  
  3287.      The following list of words are  reserved (used by TriDoor) and not to
  3288.    be re-defined  by any program incorporating  TriDoor as  a conflict will 
  3289.    arise that will  result  in non-functionality,  to some  degree,  of the 
  3290.    final resulting program or software.
  3291.  
  3292.       tridr55?       tridr60?       TDVER          TDDATE         CR 
  3293.       YES            NO             BLACK          YELLOW         RED
  3294.       MAGENTA        CYAN           WHITE          INTENSITY_ON   GREEN
  3295.       BLUE           INTENSITY_OFF  BLINK_ON       BLINK_OFF      CAPS_ON
  3296.       CAPS_OFF       CODE_ON        CODE_OFF       MAXIMUM        ECHO_ON
  3297.       ECHO_OFF       IER            IIR            LCR            MCR
  3298.       LSR            MSR            RLS            RDA            TRE
  3299.       MSI            PIC            EOI            PICMASK        ENABLE1
  3300.       ENABLE2        DISABLE1       DISABLE2       BIOSSEG        KEYHEAD
  3301.       KEYTAIL        EVEN           ODD            MARK           SPACE
  3302.       NONE           COM1           COM2           COM3           COM4
  3303.       IRQ2           IRQ3           IRQ4           buffptr        buffrec
  3304.  
  3305.  
  3306.       stats_record     pcboard_record    message_record    toggle_record
  3307.       stats            message           toggle            direct_xypos
  3308.       logon_time       comintvec         screen_mode       user_local
  3309.       XOFF             halt_program      in_chat_mode      inactivity_time
  3310.       statusbar_log    activity_log      support_path      queue_cache
  3311.       buffer_top       buffer_head       buffer_tail       oldint
  3312.       exitsave         door_name         comint            setup_comport
  3313.       setup_parameters setup_buffer      clear_buffer      tridoor_shutdown
  3314.       get_display_type cts_true          set_cts           strg
  3315.       td_upcase        capitalize        record_logon_time time_remaining
  3316.       display_time     statusbar_refresh carrier_detect    exit_door
  3317.       setup_tridoor    td_outstrg        td_outchar        td_keypressed
  3318.       td_readkey       td_readln         td_writeln        td_clrscr
  3319.       get_phone        get_date          get_keypress      confirm
  3320.       ansi_gotoxy      ansi_left         ansi_right        ansi_up
  3321.       ansi_down        ansi_erase_line   ansi_color        ansi_clrscr
  3322.       direct_char      direct_strg       display_statusbar display_helpbar_1
  3323.       read_dorinfo     read_pcboard      chat_mode         display_helpbar_2
  3324.       user_page        dos_shell         display_file      command_file
  3325.  
  3326.  
  3327.       statusbar_refresh_time   shut_down_comport      time_until_timeout
  3328.       reset_activity_timer     reset_statusbar_timer  statusbar_message
  3329.       artificial_line_noise
  3330.  
  3331.  
  3332. Triumph Software - TriDoor Documentation                                pg. 074
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.             10.0  ACCEPTABLE CREDIT IN PROGRAMS AND DOCUMENTATION
  3339.  
  3340.  
  3341.      On  the title-page  of  your documentation  where  your  program  name
  3342.    appears, or if  you do  not have such  a page,  wherever your  "credits"
  3343.    are (Written by... ) you should include the following :
  3344.  
  3345.  
  3346.                 TriDoor Communications and On-line Door Driver
  3347.               (c)1992,1993 Triumph Software, All Rights Reserved.
  3348.                         (508)263-4247 / (508)263-8420
  3349.  
  3350.  
  3351.      The  above listed  credit lines  MUST be  placed within  the  first  3
  3352.    (three)  pages  of  your documentation  to  be considered  as acceptable
  3353.    credit.  A disclaimer  must also  be in the  documentation  stating that
  3354.    Triumph Software is not affiliated with  you or  your company in any way
  3355.    and that Triumph  Software  can not be held responsible for any programs
  3356.    created using the TriDoor package.
  3357.  
  3358.      If no documentation is included in the package that you have produced,
  3359.    then a file giving Triumph Software credit for TriDoor  must be included
  3360.    in the package.  This  credit must also include  the disclaimer as noted
  3361.    in the previous paragraph.
  3362.  
  3363.      We would like to point out that this is the MINIMUM credit required by
  3364.    Triumph Software  in your  TriDoor  incorporating software packages, but
  3365.    since registration fees have been drastically  reduced, we would like to
  3366.    ask that  a more verbose  description of  TriDoor  and  what  it does be
  3367.    placed  in your  program.  It will  help  to  get  our name and software
  3368.    distributed and will keep our fees low in the future as well.
  3369.  
  3370.      Triumph Software reserves the right to temporarily revoke registration
  3371.    privileges  until  proper credit  for Triumph  Software  is given in any 
  3372.    software/programs created using the TriDoor unit.
  3373.  
  3374.      The following lines will AUTOMATICALLY appear VERY BRIEFLY upon bootup
  3375.    of any program using a registered copy of TriDoor :
  3376.  
  3377.  
  3378.            TriDoor Vx.xx - On-line Door and Communications Support 
  3379.            (c)1993 by Triumph Software, All Rights Reserved.
  3380.            Reg No : xxxxxxxxxx  Reg To : John Q. Programmer
  3381.  
  3382.  
  3383.      A special copy of the  package without this notice may  be obtained by
  3384.    special   arrangements   with  Triumph  Software.  Different   licensing 
  3385.    agreements and disclaimers may apply.
  3386.  
  3387.      Removal of  this notice  or any of it's  information without prior and
  3388.    valid  written  approval by  Triumph Software voids  the registration of
  3389.    the TriDoor package and all privilledges that go with it. 
  3390.  
  3391.  
  3392. Triumph Software - TriDoor Documentation                                pg. 075
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.                           11.0  WHO TO CONTACT
  3399.  
  3400.  
  3401.      Did your  machine curse  aloud in  protest of our software?  Are files
  3402.    missing from  the release you obtained?  id raging demons erupt from the
  3403.    center  of the earth, bursting  through your floor, and  take  away your
  3404.    dog? Did  Valkaries cart your brother off to  Valhalla to serve as their
  3405.    hero and love slave, never to return?
  3406.  
  3407.         ** Have you obtained the latest version of this software? **
  3408.  
  3409.      Well, for some of those problems you may have to contact someone else-
  3410.    (perhaps  Ghostbusters,  we  can't  do EVERYTHING you know!) However, we
  3411.    can  help   solve   your   Triumph   Software  problems.   If  you  have
  3412.    difficulties,  questions,  need  a new  release of our software, want an
  3413.    upgrade or even just have a bit of  feedback for us, please feel free to
  3414.    give us a ring or send us an Internet message.
  3415.  
  3416.      We no longer run  our own BBS, but we do  have a local  support system
  3417.    where you  can obtain  our latest  release  of TriDoor as well as ask us
  3418.    questions  and  leave  us  comments.  Just  [J]oin  the Triumph Software
  3419.    conference when you log-on, and please  leave me (Chris Russo) a message
  3420.    telling me  that  you have called.  We would  like to get a feel for how
  3421.    often  this  support  is used.  We are  also working on making this into
  3422.    an echo conference so that it may be carried world-wide.
  3423.  
  3424.                  Support BBS : Tour de Force (508)897-1963
  3425.  
  3426.             Triumph Software Voice Business Line : (508)263-4247
  3427.  
  3428.                 If we are not at work, please try us at home.
  3429.  
  3430.                 Christopher M. Russo Voice :  (508)263-8420
  3431.                     Jeremy H. DuBois Voice :  (508)263-7004
  3432.                                               (716)274-0227
  3433.  
  3434.  
  3435.       You may also contact us on the Internet at the following address :
  3436.  
  3437.                  Jeremy DuBois : jer@blaise.cif.rochester.edu
  3438.  
  3439.  
  3440.      We are also looking out for MORE potential support boards to  make our
  3441.    software more readily accessable around the world.  If you have a system
  3442.    and  are  interested,  make  sure  you  inform  us  of  your  desire and
  3443.    eligibility.
  3444.  
  3445.  
  3446. Triumph Software - TriDoor Documentation                                pg. 076
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.                          12.0  HISTORY OF TRIDOOR
  3453.  
  3454.  
  3455.      TriDoor and  it's  communications support is the  end result of almost
  3456.    four  years  of  effort by  both Jeremy DuBois  and myself. (Christopher
  3457.    M. Russo)  We  started one rainy  day when Jeremy  had  informed me that
  3458.    he had  managed to  write   some  basic  polling  Pascal  communications 
  3459.    routines.  As  Jeremy already  had a  bulletin  board  system running at
  3460.    that time, I suggested that we write an on-line game for it.
  3461.  
  3462.      And that  is when it all began.  We went from  writing a semi-complete
  3463.    and not-too-awful  on-line game  to writing DoorBase,  our first version
  3464.    of an  on-line  door  supporting  unit.  Then  I wrote a game on my own-
  3465.    Monopolistic  Competition,  followed shortly  thereafter by Monopolistic
  3466.    Competition II which was running off  of a  newer, but  still bedraggled
  3467.    version of DoorBase.
  3468.  
  3469.      Then one  day while  trying to write  a terminal program,  we realized
  3470.    that the  communications routines  that Jeremy had  made were simply not
  3471.    fast enough  to  handle all  the  tasking  necessary,  and  at  anything
  3472.    above  2400 baud, was  a miserable failure.  Thus,  Jeremy set  out once
  3473.    again to create newer, faster, interrupt driven routines.
  3474.  
  3475.      I had  quite  a lot  of trouble  dealing with  the  newer routines for
  3476.    reasons  which,  I  admit,  are  beyond  my  knowledge.  After time  and
  3477.    perseverance,  however,  I mastered  the  new  routines and re-wrote the
  3478.    newest version of DoorBase,  now  called TriDoor  in the interest of our
  3479.    newly-founded company.
  3480.  
  3481.      And thus,  I present  to you  said software and complete documentation
  3482.    for the easy usage  and incorporation of  communication and door support
  3483.    in your Pascal programs for QuickBBS and clones. I strongly believe that  
  3484.    using TriDoor is the easiest, most  user-friendly  way  of writing doors  
  3485.    and on-line games available today.
  3486.  
  3487.      Finally, before  we  commence, I would like  to take a moment to thank
  3488.    Jeremy for  all his help and  patience with my  quirky little habits and
  3489.    programming nit-picks.  I  have never  given  another  teacher more of a 
  3490.    hard time than I  gave him.  Ridiculous  as  this  may sound, he  is  an
  3491.    inspiration  to me,  and I  thank him  for all he's taught me and all he
  3492.    will, undoubtedly, teach me in the future.
  3493.  
  3494.  
  3495.